- This topic has 8 replies, 3 voices, and was last updated 13 years, 6 months ago by .
Viewing 9 posts - 1 through 9 (of 9 total)
Viewing 9 posts - 1 through 9 (of 9 total)
- You must be logged in to reply to this topic.
Support site for Tips and Tricks HQ premium products
by
Tips and Tricks HQ Support Portal › Forums › WP eMember › WP eMember General Questions › Different Menus
Tagged: emember custom coding
I would like for each membership level to have a different menu, is this possible? So, only after they log-in their “membership content” tab will appear in the main menu.
You will need to custom code your menu. This post will explain how you can find out if a member is logged in or not or what their membership level is:
You can now place your menu inside the condition so it is only visible to the condition you specify.
where do i paste the code? thanks for helping me
In your theme file where it displays the menus. Are you okay with coding in PHP and HTML?
Could please explain me step-by-step, i am learning right now. I know the very basic stuff.
thanks again
I don’t know your theme code as I didn’t develop it. So I unfortunately have no way of telling you where in your theme you need to modify. Please contact your theme author and ask him the following question.
“I am trying to add a condition around the menu so the menu only gets displayed when the condition meets. Where is the code block that displays the menu?”
Once you find that out then you will be able to wrap the condition around that code block so it only gets executed when the condition is met (in your case it will be when the user is logged in).
Thank you very much for the advice. I am going to contact the developer of the theme i am using. Your service is amazing.
I asked my theme developer the question you mentioned above and was given this:
<?php theme_generator(‘menu’);?>
</div>
</header>
This is located in the header.php
I’m fairly new to php. Can you suggest what code I would use and where to display a custom menu for members who are logged in? Thanks!
This post explains how you can programmatically retrieve if a member is logged in or not. If you show this to your developer he might be able to give you code that does what you are after:
http://www.tipsandtricks-hq.com/wordpress-membership/wp-emember-miscellaneous-tweaks-248