WordPress.org

Support

Support » How-To and Troubleshooting » Removing Privacy Page From Top Menu

Removing Privacy Page From Top Menu

Viewing 13 replies - 1 through 13 (of 13 total)
  • kapiljain.in
    Member

    @kapiljainin

    Hi,

    You have to exclude privacy page from navigation list.

    wp_list_pages('exclude=32') // 32 is privacy page id in http://getloadsmorecustomers.co.uk/ and 67 in http://stopthatbreakup.com/

    Mostly this function is called in header.php file of your theme.

    To learn more about wp_list_pages() function http://codex.wordpress.org/Template_Tags/wp_list_pages

    Roy
    Member

    @gangleri

    rustybulb
    Member

    @rustybulb

    Thanks a lot both!

    rustybulb
    Member

    @rustybulb

    I just checked and the Plugin would not be suitable because it gives you the option of including a page in all menus or no menus.

    I would still want the Privacy page on the bottom menu, but not on the top.

    rustybulb
    Member

    @rustybulb

    Hi kapiljain.in

    I just tried to put that code in and it made my site disappear.

    Parse error or something.

    So I put the code back how it was.

    The existing code is:
    <?php wp_list_pages('title_li='); ?>

    You gave me:
    wp_list_pages('exclude=32')

    I tried about 8 different combinations and they all botched it up.

    I replaced the (‘title_li=’) with the (‘exclude=32’) and that messed up.

    I added one to the other in the same brackets – that was what caused the site to disappear.

    I added it on the end and the code then showed in my header.

    Please tell me exactly where to put the code.

    thanks

    rustybulb
    Member

    @rustybulb

    Even if I replace the whole line with:

    <?php wp_list_pages('exclude=32'); ?>

    it removes the privacy page from the top but the other buttons are botched up.

    Does anyone know?

    Thanks

    rustybulb
    Member

    @rustybulb

    still not resolved

    does anyone know?

    thanks

    henkholland
    Participant

    @henkholland

    So leave your original command intact but add ‘exclude=32’
    So if the existing code is
    <?php wp_list_pages('title_li='); ?>
    the new code would be:
    `<?php wp_list_pages(‘exclude=32&title_li=’); ?>

    rustybulb
    Member

    @rustybulb

    Thank you so much!

    The ‘&’ made all the difference.

    I’ve kept a copy of that code for next time.

    henkholland
    Participant

    @henkholland

    Yeah, these little things &^%^&**

    rustybulb
    Member

    @rustybulb

    Just one last question:

    How did kapiljain.in know that the Privacy page on my two sites was 32 and 67?

    Because after doing a search to find page IDs, I was told to hover over the links to see the numbers, but that doesn’t happen with mine as I changed the permalinks.

    I also couldn’t find them in the code?

    So I’m stumped!

    Thanks

    henkholland
    Participant

    @henkholland

    I changed the permalinks on my site too, but in Admin/Edit/Pages if you hover over the page title, it shows the ID in the bottom line of the browser screen.
    Another way is using Firefox with the Addon Firebug. You can then point out area’s on your site and get great info over the used css for that piece and, pointing on a link, it shows the xhtml code with the page ID.
    So thats my way; maybe kapiljain.in has a better one.

    rustybulb
    Member

    @rustybulb

    Thank you henkholland,

    you have been very helpful!

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Removing Privacy Page From Top Menu’ is closed to new replies.