WordPress.org

Ready to get started?Download WordPress

Forums

optional sidebar for some pages in twentyeleven (5 posts)

  1. powflow
    Member
    Posted 1 year ago #

    been tearing my hair out with this one... I want the option of using sidebars on some pages in twentyeleven theme but not in others. I thought it was solved when I did as suggested here: http://wordpress.org/support/topic/twenty-eleven-sidebar-issue but it's a near miss! My single page template displays the content the way I want it but insists on placing a sidebar below content. I do not have the get_sidebar() in the page script so I can't figure out why it still shows up! I came up with a (creative, I think) workaround by making a new custom sidebar with display:none; in a style line within a <p> tag so that I can select an empty sidebar when making pages. This isn't exactly a proper solution I know and I'm still bothered by extra whitespace below the content (that shouldn't be coming from my code since display:none doesn't leave any placeholder space) Can anyone suggest a proper fix?

  2. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    using sidebars on some pages in twentyeleven theme

    use the 'Sidebar Template' for those pages;

    select it when you edit the page, in the right column under 'Page Attributes'

  3. powflow
    Member
    Posted 1 year ago #

    Wouldn't it be nice if it were that simple? It should work that way but it doesn't and that's why I'm on this forum. In themes options you have to choose the default layout for your site - if you choose "one-column, no sidebar" then no matter what you choose from the premade templates you won't get a sidebar show on a page. If you choose "content on right" (or left) that is what you'll get unless you make yourself a custom page template with no sidebar (in a child theme). I did this and was still getting the damn sidebar showing up below my content even though I had no reference to sidebars in my custom page. The way I've gotten around it is to hide the #secondary division through the css file in my child theme.
    I need to have full pages as well as sidebar pages in my site - I use a custom sidebar pluggin to make a bunch of different sidebars to choose from the right column you speak of.
    It would be nice if twentyeleven made this simple instead of cumbersome as it is - I have to make multiple custom templates to switch between and write custom css styles to achieve what should be simple. :(

  4. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    if you choose "one-column, no sidebar" then no matter what you choose from the premade templates you won't get a sidebar show on a page.

    I have to make multiple custom templates to switch between and write custom css styles to achieve what should be simple.

    in case you haven't done it yet, here is an article I wrote a while ago:
    http://www.transformationpowertools.com/wordpress/sidebar-template-for-page-in-one-column-layout

    (caveat: not sure it will work with the 'twenty eleven theme extensions' plugin, just in case you use it)

  5. powflow
    Member
    Posted 1 year ago #

    Thanks, yes I've done this already and it's 6 of or half a dozen of the other - either I set the theme option to one-column and customize a sidebar template or set the theme to a sidebar option and make a one-column template - whichever way it's done I have to monkey around with css to get the placement right (I get the same problem as Michelle). She needs to put her call for the sidebar up into the #main division and then use css to float it on the side she wants it to be.
    I am using the theme extensions plugin so perhaps that's causing some conflicts...
    I might as well just carry on and customize the crap out of my css to get things the way I want. sigh...

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.