WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I currently have a site with two levels of navigation. I am styling the wp_list_pages() list to act as my navigation.

I would like to disable the link on some pages which have children (not exclude) so that I can hover over them to display the drop down navigation but I can't click on them.

Does anyone know of such a method or parameter I could add?

share|improve this question
up vote 1 down vote accepted

You could go to the wordpress menu and make the target of the link a #. If the user clicks on it, they are taken to the top of the page where they probably are anyway since they're using the navigation.

share|improve this answer

I just released a plugin that gives you the option to remove the link (it removes the URL and replaces it with a #) of parent-items from your wp_list_pages menu: wp_list_pages tweaks. It also adds two other options, give the parent-item an is-parent class & copy the parent-item into the submenu.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.