Support » Theme: Twenty Twelve » how to remove sidebar in post but not switch to full text view?

  • Hello.
    I would like to remove the sidebar from my posts but at the same time not switch to full text view.
    Is this possible? And how?
    I could do something similar in twenty eleven, where I could display only the text of the post in the center (and not in full text mode) without the sidebar

    Thank you for your time,

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi,

    Simplest solution would be to comment out get_sidebar() call in single.php file. To do this you could change the line:

    <?php get_sidebar(); ?>

    to this code

    <?php // get_sidebar(); ?>

    Much better solution, that also preserves your customisations during theme update, would be to substitute the singe.php with new contents using child templates approach.

    Thank you very much for your reply.

    I tried that yesterday and worked for me! (with some additional css so I can place it to the center)

    My only concern was if this is too much hacking and I may destroy anything else that now I can’t think about.

    Thank you once again for your time,


    If You want to leave your original theme intact and build upon it just use child themes – you can read about it on codex at:



    how do I remove the 2012 sidebar while keeping a reduced page width?

    meaning the initial page width less the sidebar width.


    For Twentytwelve, page will be full-width by default IF there is NO widget in the sidebar. It’s done automatically without you doing anything to the template.

    In addition, you might take a look at Widget Logic Plugin, so that you can control the appearance of sidebar widgets conditionally.

    Widget Logic

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘how to remove sidebar in post but not switch to full text view?’ is closed to new replies.