0

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?

1

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.

0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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