This topic has 6 replies, 3 voices, and was last updated 11 years by SQadmin.

  • Author
  • #7257
     mpitka
    Participant

    Hi!
    How can I make a restriction that user cannot see even his own profile without membership?

    #7321
     SQadmin
    Keymaster

    Hi,
    This topic contains useful info on adding your own restrictions. You need basic PHP and WordPress knowledge: https://archived.seventhqueen.com/forums/topic/extra-membership-restrictions-how-to

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #7457
     mpitka
    Participant

    can you give me a little bit more detailed instructions? 🙂

    #7498
     SQadmin
    Keymaster

    You can make use of this code to restrict access to your profile

    COPY CODE
    
    /* Redirect user to levels page until he subscribes for a membership */
    
    add_action( 'template_redirect', 'my_membersip_restrict', 1 );
    
    function my_membersip_restrict() {
    	
        if ( bp_is_my_profile() && !pmpro_hasMembershipLevel() ) {
    	
    			wp_redirect( pmpro_url() );exit;
    	}
    }
    

    For custom work please try hiring a developer.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #7517
     mpitka
    Participant

    Thank you so much! It works perfectly!

    #7521
     MattAdams
    Participant

    #7525
     SQadmin
    Keymaster

    Hi, to create a topic in Sweetdate go at the bottom of the page here:https://archived.seventhqueen.com/forums/forum/sweetdate-wordpress

    Cheers

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
Viewing 7 posts - 1 through 7 (of 7 total)

The forum ‘Sweetdate – WordPress’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?