This topic has 1 reply, 2 voices, and was last updated 8 years by Radu.

  • Author
  • #133108
     Happiier
    Participant

    Good Day!

    Loving the theme, but couldn’t find an answer to this question in the forum.

     

    Condition: I will have 3 membership levels, 1 free and 2 paid. I would like new users to ALL BE REGISTERED TO FREE LEVEL.

    Question: Is it possible to have new users automatically registered in this way, since they can choose to upgrade their account later by choosing a paid membership-level.

    Reason: registration–email–membership_level–completion–profile is too long of a process for new users. Best would be registration–profile (automatic assignment to FREE membership level).

     

    I am open to alternatives to achieve a smoother registration process. Thank you very much!

     

    With Gratitude,

    Blaze

     

    #133231
     Radu
    Moderator

    Hi,

    the single quick solution that we have to provide it’s this :

    COPY CODE
    
    
    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() );
            }
        }
    }
    
    
    

    Using this, the member when it signup will be locked in the membership page and it should choose a package to can use the website

    The snippet will be pasted in wp-content/themes/kleo-child/functions.php

    NOTE : The Kleo Child Theme needs to be installed and activated.

    If you want anything else adapted for your needs start a collaboration with a developer.

    Ceeers
    R.

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

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

Log in with your credentials

Forgot your details?