[Resolved] Can i do Content layout to one container only just for one page

Home Forums Support [Resolved] Can i do Content layout to one container only just for one page

Home Forums Support Can i do Content layout to one container only just for one page

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1223278
    hemunt

    I want to do a Content layout to one container only just for my home page and else other pages I want them to be Separate container. How can I do that?

    #1223349
    David
    Staff
    Customer Support

    Hi there,

    you can use the Filter options provided here:

    https://docs.generatepress.com/article/option_generate_settings/

    For example this will make the home page a single container:

    add_filter( 'option_generate_settings','db_home_page_settings' );
    function db_home_page_settings( $options ) {
        if ( is_front_page() ) {
            $options['content_layout_setting'] = 'one-container';
        }
        
        return $options;
    }
    #1223762
    hemunt

    Thanks, You guys are wonderful. And so helpful

    #1224500
    David
    Staff
    Customer Support

    Glad we can be of help

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