WordPress.org

Ready to get started?Download WordPress

Forums

Twenty Eleven
How can I show the sidebar on single posts? (15 posts)

  1. PeterKirk
    Member
    Posted 3 years ago #

    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?

  2. esmi
    Forum Moderator
    Posted 3 years ago #

  3. PeterKirk
    Member
    Posted 3 years ago #

    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.

  4. PeterKirk
    Member
    Posted 3 years ago #

    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.

  5. esmi
    Forum Moderator
    Posted 3 years ago #

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

  6. Chris Aprea
    Member
    Posted 3 years ago #

    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.

  7. PeterKirk
    Member
    Posted 3 years ago #

    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.

  8. blitz999
    Member
    Posted 3 years ago #

    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. :-)

  9. rosenzweig70
    Member
    Posted 3 years ago #

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

  10. heatherisobel
    Member
    Posted 3 years ago #

    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

  11. PeterKirk
    Member
    Posted 3 years ago #

    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.

  12. heatherisobel
    Member
    Posted 3 years ago #

    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

  13. PeterKirk
    Member
    Posted 3 years ago #

    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.

  14. heatherisobel
    Member
    Posted 3 years ago #

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

  15. smijos
    Member
    Posted 3 years ago #

    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;
    }

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic