WordPress.org

Ready to get started?Download WordPress

Forums

Paid Memberships Pro
Displaying divs based on membership level (1 post)

  1. deutschwulf
    Member
    Posted 1 year ago #

    Hello,

    I'm working on a site where people will be able to see profiles for members to my site. What I need to be able to do is display specific divs on these profile pages depending on that member's subscription level.

    I've used the below code in the past, but obviously it's based on role rather than membership level:

    $user = new WP_User( $post->post_author );
    						if ( !empty( $user->roles ) && is_array( $user->roles ) ) {
            					foreach ( $user->roles as $role )
                    				echo $role;}
    						if ( $role == 'editor' ){echo "You can see this because you're an editor";}

    I want to accomplish basically the same thing that this code does, but rather than by role, do it by membership.

    Any thoughts? Thanks!

    -Steve

    http://wordpress.org/extend/plugins/paid-memberships-pro/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic