ms_has_membership()
ms_has_membership(integer $id) : boolean
Template tag: Check if the current user has a specific membership.
Multiple memberships can be specified by adding more parameters to the function call.
Examples:
<?php if ( ms_has_membership() ) : ?> Current user has any membership?
<?php if ( ms_has_membership(100) ) : ?> Current user has membership 100?
<?php if ( ms_has_membership(100,110) ) : ?> Current user has membership 100 or 110?
Parameters
integer | $id | Optional. Membership-ID to check. If no value is specified the function will check if the member has any membership at all. Guest/Default memberships are ignored. |
Returns
boolean —True if the current member has any/the specified membership.