Support » Theme: Spun » Having the sidebar on the right but not in the home page

  • Resolved Ajisai

    (@ajisai)


    Hi there,

    I’d like to know if it’s possible to put the sidebar on the right but only in the articles? I don’t want it visible on the homepage.

    I already tried this code in the css, the sidebar is on the right, it’s nice but, as I said, I don’t want it on the homepage.

    Any help?
    Thx

    #primary {
    	float: left;
    	width: 80%;
    }
    
    #secondary {
    	clear: right;
    	display: block;
    	padding: 10px 0;
    	float: right;
    	width: 20%;
    }
    
    .sidebar-link {
    	display: none;
    }
    
    .widget-column {
    	width: 80%; /*widget
    }
    
    .one.widget-column {
    	float: none;
    	margin: 0 0 0 40px;
    }
Viewing 7 replies - 1 through 7 (of 7 total)
  • totally untested, just an idea:

    try with CSS:

    .home #primary { width: 100%; }
    .home #secondary { display: none; }

    a clearer way would be to edit the relevant theme templates in a child theme, and adjust the CSS as well.

    Nope, doesn’t work

    any styles added after this line width: 80%; /*widget in this style:

    .widget-column {
    	width: 80%; /*widget
    }

    will get treated as CSS comments;

    close that CSS comment properly and retry my suggested CSS fix.

    Yeah I know,
    Just did a mistake when I copied and pasted the css code.
    The comment is closed, don’t worry.

    I did retry your suggested css.
    It doesn’t work.
    The menu is gone from the home page but does not appear in the articles.

    the suggested CSS is tested and seems to work in a local test setup;
    .home is supposed to make the styles selective to the home page; http://codex.wordpress.org/Function_Reference/body_class

    have you tried to clear the browser cache with ‘CTRL F5’ or ‘reload’ … ?

    can you post a live link to your site?

    my mistake.

    It does work now, thank you very much.
    If I want to keep the sidebar fixed when I scroll down.
    Any idea where to put position:fixed; ?

    Here is the link of my website :
    http://www.cbvinylrecordart.com/

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Having the sidebar on the right but not in the home page’ is closed to new replies.