Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress From Bootstrap to WordPress Setup a Bootstrap Theme Adding Ability for Dropdown Navigation

kwameg
kwameg
10,066 Points

In navigation, how do I get the parent page of the sub-menu to link to say # (nothing) instead of the page itself?

In WordPress custom menus, how do I get the parent page of the sub-menu to link to say # (nothing) instead of the page itself?

WordPress automatically gives a link to the page itself but I was thinking I could pass something in the $args array of the wp_nav_menu() to force a parent page of sub-menu pages link to a #. In other words, I don't want the parent page of the sub-menu pages to be an existing page that can be navigated to.

Many thanks in advance.

2 Answers

If you don't see the "Links" section as shown by mikes02, be sure to click on the "Screen Options" at the top right of your menus page and check the box next to "Links"

In Menus couldn't you just add it as a Link and for the URL input put # and for the Text input fill out what you want it to say? Like this: http://prntscr.com/5i38nz

Worked for me!
Thanks Mike.