Link to home
Start Free TrialLog in
Avatar of tablaFreak
tablaFreakFlag for United States of America

asked on

Where is navigation set in WordPress

Hello Experts - I am new to Wordpress, and know less about php, and am unclear about how to set the main navigation - I added a page which has a parent of one of the top level pages, but now its title is showing up in the main navigation. I'm not seeing where to remove this - can you help?

Thanks  
Steve
Avatar of Jason C. Levine
Jason C. Levine
Flag of United States of America image

It is theme dependent.  A good WordPress theme has an area for navigation defined in the header.php file.  This area checks to see if you have a custom menu defined (Appearance | Menus) and if so, it uses that menu.  If no menu is defined, a really well-developed theme will use a function to output a list of pages so that there is some form of navigation present. There are also themes that come with their own menu builders but this is getting rarer as the custom menu feature in the core improves.

So my guess is that you have a pretty good theme where it is looking for a custom menu and not finding one, so it is defaulting to all pages. Define a custom menu and see if it overwrites.  
Avatar of tablaFreak

ASKER

Hi Jason - Thanks for that, I found this call in home.php:

<?php wp_list_pages('title_li=&exclude=38,103,82,104,121,145,148,151,127,206,271,448'); ?>

but I don't know where that function is defined, or how to set pages to appear or not appear in the main navigation. It looks like certain pages are excluded there, by ID (?) but I don't know where to find the ID of the page I want excluded from the top nav.

Thanks for your help.
wp_list_pages is a core function: http://codex.wordpress.org/Function_Reference/wp_list_pages

To find a Page ID, just go to the All Pages screen and hover over or click the Edit link for the page in question.  The ID is visible in the URL.  Once you have that, you add the ID to the exclude array above.
That did the trick - thanks - but that worked fine as a hack, doesn't WordPress have a better way for a user to manage what's in the navigation? I'll accept your answer as the solution, but do you have any idea how the less saavy are expected to go about that?
Thanks, Jason.
ASKER CERTIFIED SOLUTION
Avatar of Jason C. Levine
Jason C. Levine
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Gotchya - thanks much for the clarification!
thanks for your speedy help!