- This topic has 32 replies, 3 voices, and was last updated 6 years, 8 months ago by Lyle.
-
AuthorPosts
-
August 16, 2017 at 9:10 am #367339Roman
After update to 1.4.2 Premium I no more have featured images displayed for single posts. I use Featured Image From URL plugin. No problem in previous versions of GP. Featured Image From URL plugin shows featured images sitewide, but headers no.
August 16, 2017 at 10:18 am #367382TomLead DeveloperLead DeveloperGPP 1.3.1 and 1.4.2 both use the
wp_get_attachment_image()
function to get the featured image – nothing there has changed.The only difference is the image output is filtered using
post_thumbnail_html
, so anything filtered into the HTML by users or plugins will work.Typically,
the_post_thumbnail()
would be used, but that’s not possible in our case, as the image isn’t necessarily from the currently viewed post.I’m not sure if the filter above would mess with that plugin – might be worth asking the author?
August 16, 2017 at 10:25 am #367386RomanIt works until GPP 1.3.1 and it should keep working after 1.4 (be back compatible). It has nothing related with Featured Image From URL plugin as code has not changed. Using external featured images is crucial for me. Could you inspect it closely? http://telezjetele.cz
August 16, 2017 at 10:31 am #367390TomLead DeveloperLead DeveloperI’m seeing every single featured image on that page, and they all seem to be coming from an external source: https://www.screencast.com/t/ZHFPs9tSnV8w
August 16, 2017 at 10:33 am #367391RomanYes but no images in single post page headers like before update.
August 16, 2017 at 10:37 am #367396RomanHere you can see single post with page header showing external featured image in GPP 1.3.1
https://www.dropbox.com/s/hqkz83au90ike7b/screen.jpg?dl=0August 16, 2017 at 10:39 am #367400RomanAnd here is the response from author of Featured Image From URL plugin:
He is right in all he has said.
I can try to handle the plugin to support the wp function they are using now.
But I will need the plugin to test. And probably the steps to simulate your problem once I don’t know the plugin.
Uf, that is really an issue for me…
August 16, 2017 at 10:41 am #367402TomLead DeveloperLead DeveloperYou can send them GP Premium if you like – all they’ll need to do is activate the Page Header add-on, then try the featured image on a single post.
I’ll test it as well on my side sometime today.
August 16, 2017 at 10:48 am #367408RomanJust sent. But they will need the activation key, will they?
August 16, 2017 at 10:55 am #367418TomLead DeveloperLead DeveloperNo, but you can tell them to hold off. It’s not their plugin – I’ll have to adjust something in GPP. Will get back to you shortly π
August 16, 2017 at 11:30 am #367434TomLead DeveloperLead DeveloperThis is probably the cleanest method for usage with that specific plugin:
add_action( 'generate_after_header', 'tu_add_featured_image_from_url' ); function tu_add_featured_image_from_url() { if ( get_post_meta( get_the_ID(), 'fifu_image_url', true ) && is_singular() ) { echo '<div class="page-header-image grid-container grid-parent generate-page-header">'; the_post_thumbnail(); echo '</div>'; } }
That will add your featured image from their URL field if it exists π
August 16, 2017 at 11:40 am #367444RomanThank you very much for this workaround!
They are also investigating at their side…
August 16, 2017 at 11:42 am #367445TomLead DeveloperLead DeveloperThere won’t be much they can do unfortunately. GPP checks to see if an image ID exists before printing the necessary HTML/filters for the image. Their plugin set the featured image ID to -1, so it never even makes it to the point of GPP printing the image.
August 16, 2017 at 11:47 am #367448RomanOK then.
They also have Featured Slider from URL β fortunatelly it works with your code:
http://telezjetele.cz/loucky-na-sucho-u-korunni-hory/They also have Featured Video from URL and Shortcode as featured “anything” β I have not tested yet.
Thanks for the exellent support, Tom.
August 16, 2017 at 11:49 am #367449TomLead DeveloperLead DeveloperNo problem π
-
AuthorPosts
- You must be logged in to reply to this topic.