Removing Left Margin for Posts
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 works well for PAGES, 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 (this one). (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 method:
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!
- The topic ‘Removing Left Margin for Posts’ is closed to new replies.