[Resolved] Featured image does not appears in indivual post

Home Forums Support [Resolved] Featured image does not appears in indivual post

Home Forums Support Featured image does not appears in indivual post

Viewing 8 posts - 16 through 23 (of 23 total)
  • Author
    Posts
  • #525114
    Tom
    Lead Developer
    Lead Developer

    As of right now you’d need to manually hook it in like this:

    add_action( 'generate_before_content', 'tu_add_featured_image' );
    function tu_add_featured_image() {
        if ( has_post_thumbnail() && is_singular() ) {
            the_post_thumbnail();
        }
    }

    We’ll be adding this as an option in the future πŸ™‚

    #525296
    Fernando

    Perfect Tom. This works as expect
    Yes, please add it soon πŸ™‚
    Best regards

    #525299
    Fernando

    The problem now is I am not able to set up the imagen under the title in individual post.
    Any idea Tom?

    #525610
    Tom
    Lead Developer
    Lead Developer

    Instead of generate_before_content, use generate_after_entry_header.

    #526285
    Fernando

    Much better! Thanks Tom.
    Best regards

    #526585
    Tom
    Lead Developer
    Lead Developer

    You’re welcome πŸ™‚

    #1011456
    ATS

    Do we need to apply the code mentioned by Tom @#525114 in GP version 2.3.2?

    I have a site where the above code is applied in functions.php in the child theme?
    Should I remove it?

    #1011720
    David
    Staff
    Customer Support

    Hi there,

    by default the Featured image will be displayed when using a Header Element. There is an checkbox in the Element to disable it if you wish.

    So no need for the code if you’re using Header Elements.

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