[Resolved] Full (container) width related posts

Home Forums Support [Resolved] Full (container) width related posts

Home Forums Support Full (container) width related posts

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #2344610
    Bright Idiots

    After creating a related post element (with GB) I would like to display this full width after the content, before the commment section. This displays in the ‘content container’, so it’s not full width. How can I display the related posts full width?

    I’m using the hook: before content container

    Also I centered the content with some CSS I found on the forum

    @media(min-width: 1024px) {
        .single-post .site-content {
            display: flex;
        }
    
        .single-post .site-content:before {
            content: '';
            display: block;
            width: 25%; /* Set value to width of right sidebar */
        }
    
        .single-post #primary,
        .single-post #right-sidebar {
            float: none;
            left: unset;
        }
    }
    
    #2344683
    David
    Staff
    Customer Support

    Hi there,

    You would need to:

    1. use the before_footer hook, as this is Full Width. And set the Hook Priority to 5

    2. move the Comments below that by adding the PHP Snippet that Tom provides here:

    https://generatepress.com/forums/topic/move-comments-section-before-the-footer/#post-1663535

    Adding PHP explained: https://docs.generatepress.com/article/adding-php/

    #2344821
    Bright Idiots

    Thanks for your quick reply!

    The related posts is full width now, but the comment section below as well. Can I make this the regular width again?

    #2344827
    David
    Staff
    Customer Support

    Can i see a post on your site ? As it requires a little CSS.

    #2344874
    Bright Idiots

    Sure, see the private info!

    #2345030
    David
    Staff
    Customer Support

    Try this CSS:

    #comments {
        max-width: 800px;
        margin: auto;
        padding-bottom: 120px;
    }

    I added some bottom padding too, to stop the footer from overlapping the form.

    #2345429
    Bright Idiots

    This works, thanks:-)

    #2345609
    David
    Staff
    Customer Support

    Glad to hear that!

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