[Resolved] featured image / sidebar issue

Home Forums Support [Resolved] featured image / sidebar issue

Home Forums Support featured image / sidebar issue

  • This topic has 9 replies, 3 voices, and was last updated 6 years ago by Leo.
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #494651
    sparkle

    my content uses featured images on pages and posts. i only want the featured image above the main content, and not the sidebars. i used the following css to adjust the image size and move it to the left.

    .page .generate-page-header img {
    text-align: left; float: left; width: 48.7%;
    }

    but the sidebars are still level with the top of the content, instead of next to the featured image.

    is this possible?

    eta, i also noticed on one of my pages this adjustment has sent the sidebar elements to below the page content. (see /gathering–logistics) why?

    #494800
    Leo
    Staff
    Customer Support

    Hi there,

    Setting it to Above Title should work: https://docs.generatepress.com/article/adjusting-the-featured-images/

    If you set it above content then it will be above content and sidebar.

    #494836
    sparkle

    ah, but it’s inside the page container. i was hoping for it to be above it. thanks.

    #494909
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    Try this PHP:

    add_action( 'wp', 'tu_move_featured_image', 60 );
    function tu_move_featured_image() {
        remove_action( 'generate_before_content', 'generate_blog_single_featured_image' );
        add_action( 'generate_before_main_content', 'generate_blog_single_featured_image' );
    }

    Let me know πŸ™‚

    #495093
    sparkle

    woohoo! that’s just what i wanted. thank you!

    i also figured out that a too-wide image set to full width on the /gathering-logistics page was pushing down the sidebars.

    thanks again for such an awesome theme.

    #495446
    Tom
    Lead Developer
    Lead Developer

    No problem! Glad I could help! πŸ™‚

    #515812
    sparkle

    hi. i’m back! πŸ™‚

    we have changed our design from 2 sidebar layout to a 1 sidebar layout.

    now i’m wondering if there’s a way to make the featured image responsive so on wider screens there’s not a gap between our featured images and our sidebar? also on smaller screens, the featured image stays behind the widgets instead of getting smaller.

    as long as i’m asking for the moon and stars is it possible to move the title of the page up onto the featured image?

    #515895
    Leo
    Staff
    Customer Support

    Hmm featured images are responsive by default.

    The problem is that the image isn’t wide enough to fill the container: http://www.screencast.com/t/dYaap1u1Byq

    And when you resize the browser down, the size of the image does get smaller: http://www.screencast.com/t/sGEH6kmuW

    #517250
    sparkle

    got it. thank you!

    #517389
    Leo
    Staff
    Customer Support

    No problem!

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