Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #7485

    Michael M
    Participant

    Hello, I’d like to use the full width style on the homepage and then boxed on the rest of the pages.

    I had set the site layout to Boxed in the Customizer and set the homepage template to full width layout, but this didn’t work. I’m using the fixed right nav menu

    Here’s a screenshop http://d.pr/i/Zhj8

    Could you tell me how I could write this condition? Thank you

    #7492

    Rubin
    Keymaster

    Hey Michael,

    currently the full-width / boxed setting in the Customizer is a global setting so you only can use it on all pages and not change it for one single page. Either you go full-width or boxed. We will put a note in our feature list to maybe add the possibility of selecting it for single sites in the future. Thanks for your feedback!

    #7506

    Michael M
    Participant

    yes, please do. I think a lot of people would appreciate the flexibility. And in my case, it’s just nice to have fullscreen images on the homepage and everything kept as boxed on the rest.

    Is there any chance that you can write a php conditional that would override the global setting?

    Something like IF homepage, use full width, ELSE use global setting.

    I know the logic, I’m just not sure where to write this. Thank you

    #7512

    Rubin
    Keymaster

    Hey Michael,

    that would be very complex and lead to a lot of problems when changing stacks and other things we would have to think through this before you run into issues long term and stuff is broken. I will update you if I can find an easy fix for you. Stay tuned.

    #7520

    Michael M
    Participant

    ok great. Thank you

    #7528

    Michael M
    Participant

    Hi there again, so I think I’m coming up with an alternative but wanted to ask help regarding the CSS.

    I have set the site layout to full width for the homepage. For the blog page though, there is no container. Here’s a screenshot: http://d.pr/i/MXw7

    I set the template to Blank Container – Header and Footer but it seems to no show a container. Could you help out please?

    #7571

    Kory
    Keymaster

    Michael,

    Pages like your blog will not respond to any page templates you apply to it as these are not “pages” in the traditional sense (or at least how WordPress views them). Regarding your original post, if you’re wanting to use a full-width style on your homepage but boxed on the rest of your site, set your global option to boxed, and then you could use the following CSS to remove the boxed styling on the homepage:

    .home .site {
      margin: 0;
      border: 0;
      width: 100%;
      max-width: 100%;
      background-color: transparent;
      -webkit-box-shadow: none;
              box-shadow: none;
    }

    This will allow you to keep things boxed on your entire site but remove the styling from the hompepage so it can go full-width. If this doesn’t work right out of the box, try appending the !important selector to each property, like so:

    .home .site {
      margin: 0 !important;
      border: 0 !important;
      width: 100% !important;
      max-width: 100% !important;
      background-color: transparent !important;
      -webkit-box-shadow: none !important;
              box-shadow: none !important;
    }

    Thanks!