I want only my sub-pages to be clickable in the navbar

I would use the built in WordPress Menu Manager (Appearance -> Menus) to create my menu structure.

For each of the ‘dummy’ parent pages you can just use a second link to that pages first child page, and rename it to read however you want.

So if your structure is:

-Parent A

  • Child A

  • Child B

  • Child C

And you want to make it so that clicking on Parent A will take people to the Child A page, just insert a link to Child A as your top-level page, and then rename it to read “Parent A”.

Once you have this structure created how you like it, you can use WP_Nav_Menu (http://codex.wordpress.org/Function_Reference/wp_nav_menu) to display the menu in your header.

If on your interior pages you need to show only the child pages of the current section, you can use a plugin I wrote called WP Nav Plus to set your starting depth and only show the children pages (https://mattkeys.me/products/wp-nav-plus/).

I hope this helps.

Leave a Comment