• Tina

    (@sunflowermom)


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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Josh

    (@josh401)

    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).

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

    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.

    Moria

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Removing sidebar from POSTS?’ is closed to new replies.