Tips and Tricks HQ Support Portal › Forums › WP eMember › WP eMember General Questions › Different Menus
Tagged: emember custom coding
- This topic has 8 replies, 3 voices, and was last updated 14 years, 7 months ago by
amin007.
-
AuthorPosts
-
October 28, 2010 at 7:58 pm #2126
smunoz
MemberI 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.
October 29, 2010 at 3:39 am #25914amin007
ParticipantYou 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.
November 2, 2010 at 1:02 am #25915smunoz
Memberwhere do i paste the code? thanks for helping me
November 2, 2010 at 3:04 am #25916amin007
ParticipantIn your theme file where it displays the menus. Are you okay with coding in PHP and HTML?
November 3, 2010 at 3:05 am #25917smunoz
MemberCould please explain me step-by-step, i am learning right now. I know the very basic stuff.
thanks again
November 3, 2010 at 11:58 pm #25918amin007
ParticipantI 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).
November 4, 2010 at 4:19 am #25919smunoz
MemberThank you very much for the advice. I am going to contact the developer of the theme i am using. Your service is amazing.
May 4, 2011 at 6:50 pm #25920Joelsinc
MemberI 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!
May 5, 2011 at 1:47 am #25921amin007
ParticipantThis 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
-
AuthorPosts
- You must be logged in to reply to this topic.