[Support request] New page header in 1.4.2 and external featured images

Home Forums Support [Support request] New page header in 1.4.2 and external featured images

Home Forums Support New page header in 1.4.2 and external featured images

Viewing 15 posts - 1 through 15 (of 33 total)
  • Author
    Posts
  • #367339
    Roman

    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.

    #367382
    Tom
    Lead Developer
    Lead Developer

    GPP 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?

    #367386
    Roman

    It 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

    #367390
    Tom
    Lead Developer
    Lead Developer

    I’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

    #367391
    Roman

    Yes but no images in single post page headers like before update.

    #367396
    Roman

    Here 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=0

    #367400
    Roman

    And 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…

    #367402
    Tom
    Lead Developer
    Lead Developer

    You 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.

    #367408
    Roman

    Just sent. But they will need the activation key, will they?

    #367418
    Tom
    Lead Developer
    Lead Developer

    No, 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 πŸ™‚

    #367434
    Tom
    Lead Developer
    Lead Developer

    This 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 πŸ™‚

    #367444
    Roman

    Thank you very much for this workaround!

    They are also investigating at their side…

    #367445
    Tom
    Lead Developer
    Lead Developer

    There 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.

    #367448
    Roman

    OK 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.

    #367449
    Tom
    Lead Developer
    Lead Developer

    No problem πŸ™‚

Viewing 15 posts - 1 through 15 (of 33 total)
  • You must be logged in to reply to this topic.