Display a link public space / private space


Is there a simple way to display a link to public space (say Home) when I am in a restricted access page ?
Something like
if (is_restricted) {
show homelink;
} else {
show member page link;

thank you for your help !

  • Vaughan


    you can probably use 1 of the following functions

    current_user_has_subscription() will check if the user has a subscription

    current_user_is_member() will check if user is a member

    current_user_on_level( $level_id ) will check if user is on access level defined in $level_id

    so current_user_on_level( 2 ) will return true if the current user is on access level 2

    current_user_on_subscription( $sub_id ) will check if user is on the subscription plan ($sub_id)

    hope this helps

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.