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

  • Author
  • #178925

    Hello

    i would like to use the paid memberships pro plugin you provide with KLEO, in order to do one of the following,

    • either allow members to create only 5 groups in buddypress and then if they want to create more to have to purchase a membership and upgrade themselves
    • or, to allow members a trial period where they can create groups for a week, but after that to have to pay for any group creation they want.

    could you please inform me on how can i achieve that

    #179076
     Radu
    Moderator

    Hi,

    All available restriction are displayed on the wp-admin -> theme options -> memberships.

    For any other advanced restriction rules it’s custom work… there is no quick solution to add restriction by member type and by number of how many groups can create a certain membership.

    An alternative without custom work. it’s to create a trial membership that expires in 7 days or how many you need and to restrict the website to be usable only by the users that haves membership access by using the next snippet

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

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

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

    Cheers
    R

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Ticket 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?