Log in or Register

Unique sidebar for home page?

Home Forums NomNom Theme Unique sidebar for home page?

This topic contains 4 replies, has 2 voices, and was last updated by  jmk909er 3 months, 2 weeks ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #8106

    jmk909er
    Member

    I am using the three column layout. Is it possible to have one of the sidebars be unique to just the home page?

    #8107

    Zeaks
    Key Master

    If you mean display 3 columns on the front page and 2 on others, yes it’s possible.

    You would be better off selecting the layout you want to use on all pages other than the homepage (probably right sidebar layout). The extra sidebar is displayed under the default sidebar in a 2 column layout and can be customized to display differently on the homepage.

    You’ll need to use the .home body class. Then take a look at style.css and find the layout for three column (left and right)

    .three-column #page { max-width: 1000px;}
    .three-column #primary {
        float: left;
        margin: 0 -26.4% 0 0;
        width: 100%;
    }
    .three-column #content {
        margin: 0 34% 0 26.4%;
        width: 46.4%;
    }
    .three-column #secondary {
        float: right;
        margin-right: 2.6%;
        width: 20.8%;
    }
    .three-column #extra-sidebar{
    	position:relative;
        float: left;
        width: 20.8%;
        margin-left: -70%;
    }

    Remove the .three-column class and replace it with the .home class

    .three-column #page { max-width: 1000px;}
    .home #primary {
        float: left;
        margin: 0 -26.4% 0 0;
        width: 100%;
    }
    .home #content {
        margin: 0 34% 0 26.4%;
        width: 46.4%;
    }
    .home #secondary {
        float: right;
        margin-right: 2.6%;
        width: 20.8%;
    }
    .home #extra-sidebar{
        position:relative;
        float: left;
        width: 20.8%;
        margin-left: -70%;
    }

    This is untested but it’s the basic idea of using conditional CSS. The widgets you have in extra sidebar should display on the left on the homepage, on other pages it will drop below the other sidebar so it looks like 1 sidebar.


    Before asking a question please use the search, or check out some popular posts.
    Change twenty Eleven sidebar width
    Create a WordPress child theme
    Create excerpts in twenty Twelve
    If I’ve helped you with something, click the “Rate this post” button.

    #8108

    jmk909er
    Member

    No I want to have 3 columns everywhere but was wondering if one of my homepage sidebars could have different widgets than all the rest. I think the answer is no but I thought I would ask. Thanks.

    #8109

    Zeaks
    Key Master

    Search wordpress.org for conditional widget plugins, they will do what you want.


    Before asking a question please use the search, or check out some popular posts.
    Change twenty Eleven sidebar width
    Create a WordPress child theme
    Create excerpts in twenty Twelve
    If I’ve helped you with something, click the “Rate this post” button.

    #8110

    jmk909er
    Member

    Hey Zeaks, thanks for the tip. I looked into these conditional widget controllers. I never saw these before. Very powerful stuff. Thanks!

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.

Log in or Register