Displaying PMP Membership type under name

Solved8.43K viewsGeneral
0

How could this be done, we have some members that are considered providers in Paid Membership Pro and we want to display that under there names in the Q&A area. I own the PMP plugin

0

Add this to your theme function.php:

https://gist.github.com/rahularyan/2cdab0f4db581e0f2c36ad37cfa81f3c

selected as best answer
0

This broke my registration i think, I just noticed

0

I get error

Warning: Missing argument 2 for io_ap_user_display_name(), called in /srv/users/serverpilot/apps/silvercensuswordpress/public/wp-includes/plugin.php on line 235 and defined in /srv/users/serverpilot/apps/silvercensuswordpress/public/wp-content/themes/kleo-child/functions.php on line 19
0

I also have the code now, Where does it go

if(is_user_logged_in() && function_exists('pmpro_hasMembershipLevel') && pmpro_hasMembershipLevel())
{
	global $current_user;
	$current_user->membership_level = pmpro_getMembershipLevelForUser($current_user->ID);
	echo 'Membership Level: ' . $current_user->membership_level->name;
}
0

Oh sorry but its not showing. May be you used other account? Any way I am answering.

0

Hello Anthony,

You will also need AnsPress PMPRO extension. After installing this extension let me know.