Site logo

[Resolved] Container separator only on blog page

Home Forums Support [Resolved] Container separator only on blog page

Home Forums Support Container separator only on blog page

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1750710
    Swen

    Hello!
    I have two problems.
    1. I want a container separator only on the blog page and not on the whole page, see here.

    2. I have the content background white and have round corners and a margin on top on the start page. The background is visible at the corners. I tried to design the header with an element like on the subpages. The problem is that I have the H1 and the header image in two versions, one mobile and one desktop.

    Thank you very much!

    #1751201
    Leo
    Staff
    Customer Support

    Hi Swen,

    Let’s tackle one question per topic.

    I took a quick look at a few pages and all of them are using GenerateBlocks so it shouldn’t really matter if you are using separate containers or one container in the customizer.

    Can you set it to separate containers in the customizer and guide me to a page where you are seeing the issue?

    Let me know 🙂

    #1752338
    Swen

    Hi Leo,

    I solved the problem with the separator.
    Now I only have the problem with the white background at the top in the rounded corners.
    You can see it on the page below.

    #1752381
    Elvin
    Staff
    Customer Support

    Now I only have the problem with the white background at the top in the rounded corners.
    You can see it on the page below.

    That white background you see is coming from Appearance > Customize > Colors > Content when your site is set to “Content layout – one container”. It’s the background color assigned there.

    Remove this value to remove the unwanted white bg color.

    #1752662
    Swen

    Hi Elvin,

    The background now fits on the start page, but how can I set the background to white for only one page (blog)? I’ve tried everything now, but maybe I’m too stupid for that!
    The same is with the separation distance between the containers. I only want this on the blog page but not like now that it has a global effect. The padding for the content is also noticeable on the start page.

    I really need help understanding this!

    #1754325
    Elvin
    Staff
    Customer Support

    The same is with the separation distance between the containers. I only want this on the blog page but not like now that it has a global effect. The padding for the content is also noticeable on the start page.

    We can filter this out.

    Go set your site back to “One container” so that would be the default.

    We then add this PHP snippet so that the blog page is using separate container instead of the default. (one container)

    add_filter( 'option_generate_settings','lh_single_posts_settings' );
    function lh_single_posts_settings( $options ) {
        if ( is_home() ) {
        	$options['content_layout_setting'] = 'separate-containers';
        }
        
        return $options;
    }

    but how can I set the background to white for only one page (blog)? I’ve tried everything now, but maybe I’m too stupid for that!

    With custom CSS.

    Can you apply my suggestion first? Then let me know so I can re-inspect the page for the CSS writeup. Thanks. 🙂

    #1754649
    Swen

    Hi Elvin,
    now I’ve added the filter.

    Thanks!

    #1754879
    Swen

    Hello Elvin,
    I went a different way and just set the start page content to a different color.
    I am now trying to design the blog using templates.

    Thank you very much, you are a great team!

    #1756468
    Elvin
    Staff
    Customer Support

    No problem. Let us know if you need further help. 🙂

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