WordPress.org

Ready to get started?Download WordPress

Forums

Twenty Twelve
how to remove sidebar in post but not switch to full text view? (6 posts)

  1. alexandros_z
    Member
    Posted 1 year ago #

    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,
    Alex

  2. kkielak
    Member
    Posted 1 year ago #

    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.
    Rgds
    Chris

  3. alexandros_z
    Member
    Posted 1 year ago #

    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,
    Alex

  4. kkielak
    Member
    Posted 1 year ago #

    Alex,

    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: http://codex.wordpress.org/Child_Themes

    Regards
    Chris

  5. idave147
    Member
    Posted 1 year ago #

    Hi,

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

    meaning the initial page width less the sidebar width.

    Thanks,
    Dave

  6. paulwpxp
    Font hero
    Posted 1 year ago #

    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
    http://wordpress.org/plugins/widget-logic/

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic