Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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
add comment

2 Answers

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
add comment

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
add comment

Your Answer

 
discard

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.