-
Author
-
November 24, 2013 at 17:01 #7164mpitkaParticipant
Hi!
I want to hide top menu from everyone else but Pmpro members with ID4.
This worked with custom CSS with not logged in users, but I don’t know how to modify it.
body:not(.logged-in) .top-bar {display:none;}
Can someone help?
November 26, 2013 at 11:18 #7246SQadminKeymasterHi, You can’t do it with CSS. You have to edit sweetdate/header.php and find the menu function: wp_nav_menu( … );
and change it to if ( pmpro_hasMembershipLevel(array(1,2,3))) { wp_nav_menu( … ); }You will need basic PHP knowledge
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionNovember 26, 2013 at 12:09 #7252mpitkaParticipantThank you for your help!
Is it possible to give a little bit more detailed instructions, because I don’t have good PHP knowledge.
November 26, 2013 at 12:47 #7255AnchoraParticipantit was well explained, wasnt it? 😀
Hi, You can’t do it with CSS. You have to edit sweetdate/header.php and find the menu function: wp_nav_menu( … );
and change it to if ( pmpro_hasMembershipLevel(array(1,2,3))) { wp_nav_menu( … ); }…find header.php…
…find wp_nav_menu…
…change it….
😉November 26, 2013 at 13:11 #7256mpitkaParticipantheh, You’re right. I don’t know what I messed up. For everybody else, who’s so noob, the whole working code is:
<?php if ( pmpro_hasMembershipLevel(array(1,2,3))) { wp_nav_menu( array( ‘container’ => false, ‘menu_class’ => ‘left’, ‘theme_location’ => ‘primary’, ‘fallback_cb’ => ‘sweetdate_main_nav’, ‘walker’ => new sweetdate_walker_nav_menu) ); } ?>
Thank you!
December 10, 2013 at 11:05 #8053mpitkaParticipantNew problem arrived.
This code you gave me previously. It worked fine with older version of theme. Now it will disable menu for ALL users. Any ideas? 🙂
December 11, 2013 at 14:56 #8113AbeKeymasterGreat 🙂
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer. -
AuthorPosts
The forum ‘Sweetdate – WordPress’ is closed to new topics and replies.