-
Author
Tagged: buddypress, create a group, paid memberships pro
-
March 27, 2015 at 18:49 #51860agolden42Participant
Sorry if this has been asked before, but I didn’t see this specific question in my searches of the forum. I’m using BuddyPress and Paid Memberships Pro. I’d like to hide the “Create a Group” link from specific membership levels. Any guidance would be appreciated.
March 27, 2015 at 21:23 #51885sharmstrModeratorThe best place for answers about PMPro is PMPro not here. With that said, google pmpro_hasMembershipLevel(). That’s the function you’ll need to use to check the membership level of the current user. There’s the bp_get_group_create_nav_item filter you can tap into. If you have questions about that, you should ask over on the buddypress forums.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
March 27, 2015 at 21:34 #51886sharmstrModeratorHere’s some pseudo code that’s off the top of my head, so not guaranteed to work but should give you an idea on how to do it.
COPY CODEadd_filter( 'bp_get_group_create_nav_item ', 'can_create_group' ); function can_create_group() { if !pmpro_hasMembershipLevel() { return; } $create_group_button = bp_get_group_create_button(); // Make sure the button is available if ( empty( $create_group_button ) ) { return; } $output = '<li id="group-create-nav">' . $create_group_button . '</li>'; return $output; }
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
-
AuthorPosts
The forum ‘KLEO’ is closed to new topics and replies.