Skip to:
Content
Pages
Categories
Search
Top
Bottom

Member List filter (WPMUDev Membership plugin)


  • iburnthings
    Participant

    @iburnthings

    I have very little coding experience but I say a similar script for s2Membership that would show or hide users from the members-loop based on their plugin role. I found a few functions for the plugin i’m using and tried to adapt it but now with the added code my members list is empty. I have 1 user in the named subscription level.

    <?php while ( bp_members() ) : bp_the_member(); ?>
    
    <!--Only show certain roles in member lising-->
    
    <?php $sub_id = 'NeedyNerd';//manually define subscription name for Membership exclusion ?>
        
    <?php if (current_user_on_subscription($sub_id)): ?> 
    
    Standard loop structure here
    
    <?php endif; ?>
    
    <?php endwhile; ?>

    I know which databases and such the subscription names and id numbers are stored in but if this requires a DB call I have no idea how to do it.

    Since I’m a complete php novice and really just a copy/paste kind of guy I was hoping for a bit of help.

    Here are the functions I found for Membership
    current_user_is_member()
    current_user_on_level($level_id)
    current_user_on_subscription($sub_id)

    WordPress Version 4.0
    Buddypress Version 2.1.1
    Membership Premium Version 3.5.2.3

    http://preview.alturl.com/i5bb8
    http://alturl.com/i5bb8

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Member List filter (WPMUDev Membership plugin)’ is closed to new replies.
Skip to toolbar