Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1417333

    Coen M
    Participant

    Hi!

    I’m trying to figure out how I can have a full-width layout, but only on the blog page (not on posts, but the actual blog page that shows all posts) a content-left layout.

    The blog page seems to be the only page I cannot edit these settings per-page on (says: you’re currently editing your blog page).

    Any way to accomplish this?

    Thanks for your help!

    Cheers, Coen.

    #1417390

    Rue Nel
    Moderator

    Hello There,

    Thanks for writing in! The blog index will follow the global settings you may have set in the customizer. If your global settings is set to Content Left – Sidebar Right, and that you want your blog index to be “Fullwidth”, please go to the customizer, Appearance > Customize > Blog > Layout and change it to Fullwidth.

    Hope this helps.

    #1417508

    Coen M
    Participant

    Hi! Thanks for your message.

    No, sorry for being unclear but I want it exactly the other way around: the whole site fullwidth, but only the blog index content left – sidebar right.

    Thanks!

    Cheers, Coen.

    #1417604

    Paul R
    Moderator

    Hi Coen,

    In that case, please select Full width content layout under Layout and design in the customizer.

    Then add this in your child theme’s functions.php file.

    
    function add_shop_sidebar($contents) {
      
      if ( is_home()  ) {
    
        $contents = 'content-sidebar';
      }
      
      return $contents;
    }
    
    add_filter('x_option_x_layout_content', 'add_shop_sidebar',999);
    

    Hope that helps.

    #1418736

    Coen M
    Participant

    Hi,

    Thanks for your response!

    Unfortunately, it doesn’t seem to do anything… blog index (https://musiciansdiet.com/read-watch-listen/) still displays full width as well..

    Cheers, Coen.

    #1418739

    Coen M
    Participant

    Sorry my bad, forgot to change settings on “customizer – blog” to correct..

    It works!

    Thanks so much, awesome support.

    Cheers, Coen

    #1418829

    Paul R
    Moderator

    You’re welcome! 🙂

    #1425085

    Coen M
    Participant

    I’m looking to pull the same trick with my shop page 🙂

    Tried adapting ” if ( is_home() ) { ” to ” if ( is_shop() ) { ” but that broke my site (sorry, newb when it comes to php).

    Could you maybe tell me the correct adaptation ?

    Thanks so much

    Cheers

    #1425184

    Christian
    Moderator

    We’re sorry but further customizations from here would be getting into custom development, which is outside the scope of support we can offer. If you need more in depth changes, You might want to contact our trusted partners who caters X setup and customization needs. Please see https://community.theme.co/custom-development/. Thanks for understanding.

    #1425248

    Coen M
    Participant

    Ok, that’s too bad. So it’s not as simple as adapting the code above that you already gave me to define the shop page in stead of the blog page?

    #1425329

    Christian
    Moderator

    The code given previously should work. You might have missed something which caused the error. I tried this in my test site and it works in blog and shop.

    function add_shop_sidebar($contents) {
      
      if ( is_home() || is_shop() ) {
    
        $contents = 'content-sidebar';
      }
      
      return $contents;
    }
    
    add_filter('x_option_x_layout_content', 'add_shop_sidebar',999);