[Resolved] Using Elements to show a featured image on a different place

Home Forums Support [Resolved] Using Elements to show a featured image on a different place

Home Forums Support Using Elements to show a featured image on a different place

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1449646
    Julien

    Hello guys,

    My goal is to set up a blog content with a sidebar on the right with widgets (for desktop).
    But I want the sidebar not to show before the post title (by default it shows along with the featured image).

    So I decided to use Elements with the hook “generate after header” and the PHO code “<?php the_post_thumbnail(); ?>”

    It does work but I have several questions and problem :
    – Do you think it’s the best way to do ?
    – With current configuration, the featured image is not centered (like not restricted to container) and the size is too big (I would like to have “medium” image size)
    – With current configuration the blog background (white) is not displaying behind the featured image, which is ugly, how can I do to fix it ?

    Thanks for help !

    #1449706
    David
    Staff
    Customer Support

    Hi there,

    instead go to Customizer > Layout > Blog —> Featured Images >> Posts – and set the location to Above Content.

    https://docs.generatepress.com/article/adjusting-the-featured-images/

    #1449719
    Julien

    Ahah ! Sometimes it’s a bad things to look for complicated solution ! Thank you David !

    Meanwhile if I do that, the image is off container and doesn’t have the normal white background like other elements. How should i correct that ?

    #1449748
    David
    Staff
    Customer Support

    🙂

    You would either need to add a larger image size to fill the space.
    Or you can force them to fill the space with this CSS:

    .single-post .featured-image img {
        width: 100%;
    }
    #1449825
    Julien

    Thanks David

    #1449856
    David
    Staff
    Customer Support

    You’re welcome

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