widget secondary (right) area (3 posts)

  1. esse3
    Posted 2 years ago #

    Hi guys, I'm using oxygen theme on wordpress 3.7 and I want to show the widget area secondary only in main page, because in the other pages of the website I would show nothing on this space or use it for the page content. How can I solve this problem? I think in the css text style but where?
    thanks everybody

  2. CrouchingBruin
    Posted 2 years ago #

    For future reference, whenever you post a question, you should include a link to your site.

    Yes, you can use CSS to do what you want. On the home page, the body element will have a class called home assigned to it, so it's relatively easy to hide the sidebar on all other pages. In the CSS below, I've also added the rule for expanding the content area when the sidebar is hidden, in case you want the content area to expand. Just copy this CSS into your custom CSS field by going to Appearance > Customize > Miscellaneous > Custom CSS; don't worry that the field is only one line, if you do a copy & paste, it will still work.

    #content {
       width: 96%;
    #sidebar-secondary {
       display: none;
    body.home #content {
       width: 62.6666667%;
    body.home #sidebar-secondary {
       display: block;

    The first rule, for the content area, expands it out to 96%, and the second rule hides the sidebar. This would be the default state. Then the second two rules kick in if the page being displayed is the home page.

  3. esse3
    Posted 2 years ago #

    thanks @CrouchingBruin it works very well!!

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic