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.

Newbie question here. I'm hoping to modify a menu programmatically and am having trouble figuring out the right way to do it.

My site uses a membership plugin. Users pay to become members, and depending on what kind of member they identify themselves as, they get to view different content. In my case, I want to have one menu where the last menu item changes depending on what kind of user you are. If anonymous, you get a "join now" link; other members see links to the content they can access. The rest of the menu is the same for everybody.

I see I can hook into wp_nav_menu_items, but that looks like formatted HTML already. Ideally my theme would do the formatting and I'd just feed it a list of pages that the user would see for the last menu item & its submenu items.

What's the right hook to do this?

FWIW, this is WordPress 3.9 running the Customizr theme. I'm too new with WP to know if that makes a difference.

share|improve this question

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.