WordPress.org

Support

Support » Themes and Templates » Removing Left Margin for Posts

Removing Left Margin for Posts

  • I use the twenty eleven theme for several WordPress sites. [url=https://twentyelevendemo.wordpress.com/]Here[/url] is a link to a demo of the theme. On [url=https://twentyelevendemo.wordpress.com/a-page-with-a-sidebar/]this[/url] page of the demo, it explains:

    Twenty Eleven leaves sidebars off of posts and pages to highlight your content and proudly feature the magic that happens between your writing and your visitor’s comments. That said, sometimes you just want a sidebar on your pages. Selecting the custom Sidebar Template for your page will do just that. 🙂

    However, while this [url=https://twentyelevendemo.wordpress.com/a-page-with-a-sidebar/]works well for PAGES[/url], there does not appear to be any such option for POSTS. All POSTS look sort of like this:
    https://twentyelevendemo.wordpress.com/2011/05/04/featured-posts-in-twenty-eleven/

    In other words, the content is basically centered with a large left-hand margin. So that is my question: How can I get rid of that big left-hand margin on POSTS? There’s got to be a simple way to do it with CSS without affecting PAGES, right?

    I am trying to make all POSTS look just like PAGES WITH SIDEBARS as seen at the link above ([url=[url=https://twentyelevendemo.wordpress.com/a-page-with-a-sidebar/]this one[/url]). (Note: The difference is that I have the sidebar on the right, not the left as shown on the demo linked above)

    I tried this:
    http://iamtgc.com/adding-the-sidebar-to-a-twentyeleven-child-theme/

    Adding <?php get_sidebar(); ?> to the single.php file in my child theme does indeed add the sidebar. However, because the actual content of the post has the large left margin, it pushes the sidebar down beneath the actual post. I modified functions.php as outlined at that iamtgc.com link above, and that did make POSTS display correctly (sidebar next to the content); however, it also messed up all PAGES with no sidebars. Instead of taking up the full width of the content area as normal, they began to only take up 2/3rds just like a POST, with the other 1/3 taken up by the side bar.

    Yes, I am using child themes! 🙂

    Any help would be GREATLY appreciated! Thanks in advance!

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Removing Left Margin for Posts’ is closed to new replies.