Jump to content
Sign in to follow this  
ddmunoz

How to create a conditional menu?

Recommended Posts

ddmunoz

I am currently using WP-eMembers which is a plug-in for managing accounts, and I need to place a page that appears on the main menu, only after the users access the premium account. In other words, I am trying to add a condition around the main menu so a page only gets displayed on the main menu when the condition meets. Where is the code block that displays the menu on platform pro ? Could you please explain to me step-by-step because I am learning right now? This is a copy of the code that I have to paste on the theme. global $auth; $user_id = $auth->getUserInfo('member_id'); if (!empty($user_id)) { //pleace code that only members can see } Thank you very much! David

Share this post


Link to post
Share on other sites
cmunns

I'm not actually not quite sure if this is possible to build in to the WP3.0 menu system. Possibly into the default wp_list_pages function, which are you using? I might also consider CSS by adding a class to the body if logged in? then use it to hide/show nav item

Share this post


Link to post
Share on other sites
ddmunoz

Hello Adam, Thank you very much for answering my question. I asked a developer of WP-eMembers to create this conditional menu for me, but he needs to know, where is the code block that displays the menu on platform pro? Thank you again for taking the time to answer my question!

Share this post


Link to post
Share on other sites
cmunns

the file is in this directory SECTIONS > NAV > section.nav.php

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×