elbalazo
Member
Posted 2 years ago #
Hey all, I am trying to do something simple.
I want to remove the link from the item "Contact" in my top navigation. I think I need to write a conditional if/else statement to do it.
Here is the link to the site so that you can see what I am talking about: http://www.bornhuman.com/dev/to
Extra Credit: if someone could show me how to remove the link from any top level item when there is a child dropdown, I would be eternally thankful.
Cheers!
You can try the following code:
<?php wp_list_pages('title_li=&depth=1&exclude=30'); ?>
Find the similar code (probably in your header.php file) and replace it with this. It will provide a list of the parent (top level) pages only excluding page 30 (your Contact page).
Cais' method works.
You can also use this plugin instead of changing code
http://www.technokinetics.com/plugins/page-lists-plus/
which will accomplish your "extra credit" needs also
elbalazo
Member
Posted 2 years ago #
Thanks guys! I'll check this stuff out.
elbalazo
Member
Posted 2 years ago #
Hey guys, so I wanted to report back, as I am still having some difficulty.
Option 1 (removing the href), just results the entire link being removed. I'm sorry, I don't think that I was specific. I just want to remove the link href.
Option 2 removes the jQuery dropdown menu I am using. Any wisdom about this? I'm not a programmer, so I can't figure it out.
Thanks both for your replies. Hope to hear from you soon.