[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 - 16 through 30 (of 33 total)
  • Author
    Posts
  • #367450
    Roman

    I am marking the topic resolved, in case I encounter any issues with this specific plugin I may re-open it. Thanks

    #367478
    Roman

    Well, this of course doesn’t allow using other features of new page header ad-on, like content overlayed featured image, parallax etc…

    #367563
    Tom
    Lead Developer
    Lead Developer

    That’s correct, those features would currently require the image to be locally hosted.

    I’ll try to make it more robust in future versions.

    #367763
    Roman

    Please consider that hosting images localy might not be the right way for image heavy sites as WP has not improved media handling for ages.

    I would apreciate either GPP 1.4.x to be back compatible with GPP 1.3.1 regarding featured images or to have an option to use previous version of header ad-on for posts. Those fancy hero images may be usefull for static pages but the new header ad-on is just an overkill for single posts…

    Meanwhile, are there any other ways how to use all features of the new header ad-on overlayed on background image delivered from the FIFU plugin?

    #367856
    Roman

    By the way, your a/m code doesn’t work for Single Post Header Location options: Inside content area and Below post title – no image delivered from FIFU plugin at all.

    #368028
    Tom
    Lead Developer
    Lead Developer

    What’s strange is that the code that displays the image is identical in 1.3 and 1.4 – technically, it shouldn’t have been working at all in 1.3.

    I’ll absolutely try to adjust things so it works with that plugin, but you’re the only person that has needed the ability to host images off-site (I don’t really understand the reasoning).

    The code I gave you hooks into the “generate_after_header” hook. You can adjust it to hook into any hook you want: https://docs.generatepress.com/collection/hooks/

    #368223
    Roman

    But have been working pretty well. These are things between heaven and earth πŸ™‚

    Thank you for your willingness to investigate further.

    Hosting images off-site has an advantage that I can store even large originals outside WP for free up to for example 1TB with Flickr and to save money for hosting the site and bandwidth. Just google it and you will find out that photographers do it on their photo sites/ blogs.

    #368382
    Tom
    Lead Developer
    Lead Developer

    I think I found a solution.

    If you’d like to test it before I release 1.4.3, shoot me an email: https://generatepress.com/contact/

    Thanks!

    #368484
    Lyle

    Roman, Tom,

    Just want to jump in on this as I have recently found and use the FIFU plugin and would also be interested with any developments for it’s use with GPP.

    My use case is somewhat different in that I was looking for a way to add a featured image to a post that had been created with Open Live Writer (or MarsEdit for the Mac). These two offline editor do not natively offer this. FIFU however cures this by setting the first image in a post as the featured image.

    Additionally, I now have added this plugin to other post heavy sites as it adds a very nice feature and that is a column in the page/post list with a thumbnail of the featured image (if applied). Very handy πŸ™‚

    I put together a tutorial on OLW with GPP Sections and mention this plugin although it is not used in this case.

    http://snifflevalve.com/tutorials/generatepress-premium-using-open-live-writer-insert-edit-content/

    Cheers!
    Lyle

    http://snifflevalve.com
    Tutorials and tips for GeneratePress, WP Show Posts, WordPress and Elementor

    #368514
    Tom
    Lead Developer
    Lead Developer

    Just sent it to you Roman.

    The only thing you should have to do now is “trick” GPP into thinking a featured image exists, since FIFU sets the featured image ID to -1:

    add_filter( 'generate_page_header_options', 'tu_featured_image_from_url' );
    function tu_featured_image_from_url( $options ) {
    	$args = array(
            'post_type' => 'attachment',
            'post_mime_type' =>'image',
            'post_status' => 'inherit',
            'posts_per_page' => 1
        );
    	
    	$image = new WP_Query( $args );
    	if( $image->have_posts() && get_post_meta( get_the_ID(), 'fifu_image_url', true ) && is_singular() ) {
    		$options[ 'image_id' ] = $image->posts[0]->ID;
    	}
    	
    	return $options;
    }
    #368525
    Roman

    This code together with the new beta of GPP works partially. With empty Page Header, featured image is shown as expected, bud as soon as any content is added in to Page Header, featured image disappears.

    #368776
    Tom
    Lead Developer
    Lead Developer

    The featured image has always been removed once page header content is added. Did it used to use the FIFU plugin to set the background image?

    #369855
    Roman

    If it is possible to use locally hosted featured image as the background image, it might also be possible to use the featured image delivered through the FIFU plugin this way.

    #371060
    Roman

    Any fix?

    #371686
    Tom
    Lead Developer
    Lead Developer

    Not yet – still looking into it. Will update this thread with an answer πŸ™‚

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