• Resolved m

    (@greeninthemiddle)


    How can I remove sidebar on front page and make this page full width in theme twenty fifteen? I have tried everything I could find on this forum by adding the codes they give in my custom css sheet, but it doesn’t work. I’d also like to make the sidebar on the other pages transparent, but that doesn’t seem to work either when I tried the suggestions by the forum.

    Thanks a lot!

Viewing 9 replies - 1 through 9 (of 9 total)
  • Can you please post a link to your site? If you remove the sidebar, then what are your users going to use for a menu in order to navigate to other pages? Or is the front page a static page with links to the other pages?

    Thread Starter m

    (@greeninthemiddle)

    Hi,

    Thanks for your reply.

    I’d like to put ‘enter’ on the front page, which links to the next page which will have the sidebar with the menu.

    You didn’t provide a link to your site, but try this.

    If you’ve a created a child theme, then copy the rules below into your child theme’s style.css file. Otherwise, use a CSS plugin like Jetpack or Custom CSS Manager. Don’t modify the theme’s style.css file directly. Any changes made to a theme file will be wiped out the next time you update/upgrade the theme.

    .home #sidebar {
       display: none;
    }
    
    @media screen and (min-width: 59.6875em) {
       .home .site-content {
          margin-left: 0;
       }
       body.home:before {
          display: none;
       }
       .home .site-content {
          width: 100%;
       }
    }
    
    body:before {
       background-color: rgba(255, 255, 255, 0.4);
    }

    This will remove the sidebar from the home page.

    As far as making the sidebar transparent on other pages, I assume it is because you added a background image and you want it to show through. The last rule should do that. In this line:

    background-color: rgba(255, 255, 255, 0.4);

    The last parameter for the rgba function, 0.4, is the opacity level. The valid values are from 0 (completely transparent) to 1.0 (completely opaque). so a value of 0.4 means 40% opaque (60% transparent). You probably don’t want it completely transparent, unless your background image is light enough to where your users can view the sidebar text. But adjust it to your liking.

    Thread Starter m

    (@greeninthemiddle)

    Hi again,

    Thanks for your help.

    I copied the code into my custom css sheet, but nothing changes.
    My site is metaheemskerk.com

    Instead of the sidebar transparent, I think I’d rather just make it less wide.

    Can you please temporarily disable any caching plugins, as well as Yoast. I don’t see your new CSS and sometimes these types of plugins prevent updates from appearing right away.

    Thread Starter m

    (@greeninthemiddle)

    I just deactivated all plugins except the simple custom css.

    Thank you.

    OK, I see a couple of problems with your custom CSS.

    First, look for this rule:

    .comments-title,
    .comment-reply-title {
    	font-family: "Noto Serif", serif;
    	font-size: 12px;
        color:  #808080;
      a {
    	color: #808080;
    	text-decoration: none;
    }

    You see the line that reads a {? Take that line out. It is causing all of the CSS which follows not to be used.

    Then, at the very end, you are missing one more closing right brace }. Please add that to the very end.

    You probably want to center the image that’s inside the content, so add this rule to the end as well, after that previous closing right brace that you added:

    .home .entry-content img {
        margin: 0 auto;
    }

    Thread Starter m

    (@greeninthemiddle)

    Thanks so much, it works!:-)

    Erin Salmon

    (@freshfromthesoil)

    Hi, @crouchingbruin,

    Is there a bit of code for this theme that would expand the margins of the site into the area that the sidebar was in? The site I’m writing on is erinsalmonwrites.com.

    Thanks. ??

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘layout frontpage theme twenty fifteen’ is closed to new replies.