Support » Theme: Twenty Eleven » How can I show the sidebar on single posts?

  • I really like the look of Twenty Eleven, and want to use it for my blog, which has over 1000 posts and pages. But this is currently impossible for me as I need a sidebar visible with single posts and pages, not least for my AdSense ads. See my new post WordPress Twenty Eleven: give us back our sidebar! for more explanation. Is there any way to show this sidebar on each post and page, which doesn’t involve editing the 1000+ of them individually, or re-editing the theme each time WordPress is updated?

Viewing 14 replies - 1 through 14 (of 14 total)
  • esmi

    (@esmi)

    Forum Moderator

    I was expecting [Theme: Twenty Eleven] to be added automatically here, as I came to this through the links from Twenty Eleven. I don’t know why it wasn’t.

    Esmi, thanks for the quick reply. But there are no relevant plugins available yet. I know I could create a child theme, and I might do that if no one else offers a solution, but I don’t really want to replace the default CSS.

    esmi

    (@esmi)

    Forum Moderator

    You wouldn’t be replacing the default CSS. You’d be amending bits of it in the child theme.

    I’ve already contacted peter about this, but for anyone else having the same issue i’ve gone ahead and created a child theme that does exactly this.

    You can find the related article here: http://futurewebblog.com/add-sidebar-support-posts-twenty-eleven-theme/

    As mentioned by esmi, the child theme will not replace any CSS other than what is necessary to allow for a sidebar on posts.

    Thanks to Chris Aprea for already providing a solution for me, at Add Sidebar Support in Posts for the Twenty Eleven Theme. I will try it out shortly.

    I have been working on a child them for twentyeleven and getting familiar with it. I can find no reason why this behaviour is built into the theme. It confuses me as a designer, and it will undoubtedly confuse a web reader, who suddenly loses a ‘crutch’. I’m completely perplexed by this design ‘decision’.

    However…

    I have been getting familiar with the theme and have created a child theme today. The fix is very simple:

    1) add <?php get_sidebar(); ?>to single.php
    2) look for .singular in the style.css and remove any margin styles.
    3) Sorted!

    And thanks to Chris Aprea (see above) for shedding light on the issue. His fix also works. 🙂

    Thanks Peter for the thread and Chris for the solution. This is exactly what I need and I’ve got it fast!

    Hey,
    I’ve installed the parent and child theme and yet I still do not have a side bar on my “pages” – event though I do on all my posts! yay! Is there something else that I need to do to have the same sidebar show up on all of my pages? Thank you
    –Heather

    Heather, I had to edit my pages individually to select the sidebar layout option. That wasn’t a big problem as there aren’t very many of them.

    Thanks @ Peter, I dont exactly understand what that entails, is there something I need to paste into the html section of each page? if so what is it?

    So Grateful for your help

    –Heather

    No, Heather, no HTML involved. You simply need to edit each page, find “Templates” under “Page Attributes” on the right, select “Sidebar Template”, then “Update” to save your changes.

    Thank you!! I feel a bit silly now, but anyhow the mystery has been solved!
    –Heather

    Editing / removing the “singular” classes isn’t enough.

    Your comment list and form width get squished. To fix that, change this in your style.css (search for these exact values and change just the items I’ve edited, or just paste this at the very bottom of the stylesheet):

    #respond {
    width: auto;
    }
    .commentlist {
    width: auto;
    }
    .commentlist > li.comment {
    margin: 0px 0px 20px 102px;
    width: auto;
    }

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘How can I show the sidebar on single posts?’ is closed to new replies.