[Resolved] Two different featured images (for blog page & post)

Home Forums Support [Resolved] Two different featured images (for blog page & post)

Home Forums Support Two different featured images (for blog page & post)

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1449195
    Alessio

    (old support topic: https://generatepress.com/forums/topic/hook-to-add-share-buttons-after-specific-image/)

    Hey,

    I’d like to have a different featured image for the blog page and for the posts page. So far, I’ve done it manually, but that doesn’t allow me to add social sharing buttons (via hooks) under the (manually created) featured image.

    Example:

    Featured image on the blog-page:

    Different featured image on the post itself:

    Do you understand what I mean?

    Thank you for the awesome support, by the way 🙂

    #1449226
    Leo
    Staff
    Customer Support

    Hi Alessio,

    The featured image option is a WordPress core function and I don’t think it allows this modification unfortunately.

    The only workaround I can think of is to hide the default featured image on single posts in the customizer:
    https://docs.generatepress.com/article/adjusting-the-featured-images/

    Then manually add in the static image as the featured image at the top of your post.

    #1456524
    Alessio

    Hi Leo,

    sorry for the late reply. I’ve already done what you suggested, but that way I cannot add share buttons under the featured image under the hook, because it’s a manual image.

    #1457189
    David
    Staff
    Customer Support

    Hi there,

    you may want to consider adding a Custom Field to your posts which can be used to hold the secondary image. Which can then be hooked in with your social share icons.

    ACF makes that possible:

    https://www.advancedcustomfields.com/resources/image/

    #1464058
    Alessio

    Hi David,

    that’s an interesting idea, I’ll try it out! Do you know if this is also possible with the custom fields already integrated in the latest WordPress version? Also, how big will the performance impact be(for my visitors) with ACF?

    Thank you!

    #1464068
    David
    Staff
    Customer Support

    You can use the built in Custom Fields, but you would need to add a URL for the image wherase ACF provides an Image Attachment meta box.

    Performance wise i cannot see this option in ACF making any noticeable difference.

    #1465236
    Alessio

    Alright, I’ll give ACF a try, thank you!

    #1465277
    David
    Staff
    Customer Support

    You’re welcome

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