This topic has 4 replies, 2 voices, and was last updated 9 years by Radu.

  • Author
  • #122666
     suerobbins
    Participant

    Hi,

    A few questions;

    1. I have required membership enabled on my pages and I can still view them.

    2. Do I need a register page if I only accept paid memberships, if not how do I link the register paid to the membership page so people can pay?

    3.I am logged into facebook as Sue Robbins but when I try and do a test facebook login I’m logged in as Scarlett Zola Vespa who I set up as admin?

    4. When I pay the membership and register how does the theme know who I am when login in from facebook.

    Thank you

     

    #122952
     Radu
    Moderator
    Not marked as solution
    #123049
     suerobbins
    Participant
    Not marked as solution
    #123078
     suerobbins
    Participant
    Not marked as solution
    #123136
     Radu
    Moderator
    You can use this function to redirect all users that not have any membership to this page, so the users will be "locked" in this page until they buy access
    add_action( 'template_redirect', 'my_membersip_restrict' );
     
    function my_membersip_restrict() {
        global $pmpro_pages, $post;
     
        if ( is_user_logged_in() && !pmpro_hasMembershipLevel() ) {
            if (isset($post->ID) && !in_array($post->ID, $pmpro_pages)) {
                wp_redirect( pmpro_url() );
            }
        }
    }
    
    The function should be added to wp-content/themes/kleo-child/functions.php Cheers R.
Viewing 5 posts - 1 through 5 (of 5 total)

The forum ‘General questions’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?