• i need to remove sidebar from pages. I use journalized sand theme and there is no pages.php

    how should i go about it?

    any suggestions?

Viewing 1 replies (of 1 total)
  • The easiest way would be to put conditional tags around your sidebar saying that it should only show up if you are NOT viewing a page.

    Here is the Codex’s list of conditional tags. In your sidebar.php template, you would want to add these tags somewhere near the top, probably right under where it says
    <div id="sidebar">
    <ul>

    but before the actual *content* of the sidebar starts. Then just add the tags for all the pages you want the sidebar to show up on. It will look like this:

    <div id="sidebar">
    <ul>
    <?php if (is_home() | is_single() | is_category()) : ?>
    (or whatever “if” statements you choose)

    sidebar content

    then at the bottom of all the sidebar content you’ll add

    <?php endif; ?>

Viewing 1 replies (of 1 total)
  • The topic ‘Remove sidebar from pages’ is closed to new replies.