• I would like to get rid of the sidebar on the posts page but even though I have chosen “one column, no sidebar” it still shows

Viewing 8 replies - 1 through 8 (of 8 total)
  • Are you currently using a static front page on your site?

    Thread Starter Drain0

    (@drain0)

    Yes

    Your main posts page will automatically use your theme’s index.php template file – not any page template that you try to apply.

    Thread Starter Drain0

    (@drain0)

    Thanks Esmi, do you know if there is a hack or fix to allow no sidebar on posts page?

    You would need to modify your theme’s index.php template file. But don’t edit the Twenty Ten theme. Your changes will be over-written the next time you upgrade WordPress or the theme. For this reason, it is recommended that you consider creating a child theme for your customisations.

    Thread Starter Drain0

    (@drain0)

    Thanks Esmi editing out <?php get_sidebar(); ?> index.php and single.php gets rid of sidebar.
    #content is still the same width so I made it width: 90% margin: 0 auto but unfortunately this runs under the sidebar on other pages.

    Thanks anyway.

    BTW: I am doing a child theme. The theme I’m using is Third-Style.

    i don’t have a local copy of ‘third style’ to check it, but if ‘third style’ is an offspring of twenty ten, then try to change the following line in index.php:

    <div id="container">

    to:

    <div id="container" class="one-column">

    (this is from the one column template; if the above is not exactly right, have a look into the one column template of your theme)

    Thread Starter Drain0

    (@drain0)

    Thank you alchymyth that fixed it.

    To recap – This is how to remove sidebar from posts pages:

    Delete <?php get_sidebar(); ?> and change <div id="container"> to <div id="container" class="one-column"> in index.php and single.php

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘How to get rid of the sidebar on the posts page?’ is closed to new replies.