Forums

Removing certain pages from header/sidebar (4 posts)

  1. exit53
    Member
    Posted 4 years ago #

    I'm new to WordPress and am having trouble figuring out how to set certain pages to not be included in the "Pages" listing in the header and sidebar. Scanning the header.css I noticed this:

    and I'm sure it has to do with the '.$pages_to_exclude' line. In short, if you notice on my site at http://www.staticandlullabies.com - the page links at the top and on the side - I do not wish to have all my pages listed there, just certain ones.

    Thanks so much!

  2. Otto
    Tech Ninja
    Posted 4 years ago #

    I see that your theme is "pmode-10". I took a look at that theme.

    Add this just before that line.
    <?php $pages_to_exclude = 'exclude=123,456'; ?>

    Replace 123 and 456 and such with the ID numbers of the Pages you want to exclude. You can get these numbers from the Manage->Pages screen.

  3. exit53
    Member
    Posted 4 years ago #

    Otto42, Thanks so much for your help. Is there a way if I wanted to have every page omitted in the header and just certain pages omitted in the sidebar 'Pages' area? Is there an all-excluding command for the header, in otherwords? And as far as the sidebar goes, would I just include that same exclusion command you gave me?
    Thanks again.

  4. FaithMechanic
    Member
    Posted 3 years ago #

    Otto42 - Thanks. I used this on a different blog. I had to learn how to adapt it some.

    http://www.hopefaithprayer.com

    Thanks again,

    Rex

Topic Closed

This topic has been closed to new replies.

About this Topic