Removing sidebar from POSTS? (4 posts)

  1. Tina
    Posted 4 years ago #

    I know how to remove the sidebar from pages...my question is...is there a way to remove it from POSTS??

  2. Do you have a site url?

    This should work:

    .post #sidebar {
      display: none;

    But it depends on how your theme is set up (which you didn't mention which theme you are using).

  3. Alessio Lo Vecchio
    Posted 4 years ago #

    remove <?php get_sidebar ?> from your single.php

  4. mbyrne
    Posted 4 years ago #

    I added the following code to hide the sidebar from the news page and instead it hid the sidebar on all the pages.

    What did I do wrong?

    In the style.css:

    #sidebar ul.menu li.ul.sub-menu li usl.li ul.sub-menu li, #footwidgets ul.menu li ul.menu li ul.sub-menu li {display: none;

    In sidebar.php:

    <?php if (! Is_page (array(news) ) :?>
    <?php else : ?>
    <?php get_sidebar () ; ?>
    <?php endif ?>

    In sidebar.php:

    .post#sidebar {
    Display: none;

    I also noticed that I can't see <?php get_sidebar ?> in the source code.


Topic Closed

This topic has been closed to new replies.

About this Topic