Skip to:
Content
Pages
Categories
Search
Top
Bottom

Theme after login.

Viewing 4 replies - 1 through 4 (of 4 total)
  • @peter-hamilton

    Participant

    In your child-themes function.php paste the following code:

    add_action( 'init', 'blockusers_init' );
    function blockusers_init() {
    if ( is_admin() && ! current_user_can( 'administrator' ) &&
    ! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
    wp_redirect( home_url() );
    exit;
    }
    }

    @inderlovy

    Participant

    Thank you but I want to know if there is an option so that users who register themselves and get default role as ‘Subscriber’ rather than becoming ‘Contributor’ by default.

    @ripulkr

    Participant

    Set the default user role in WP admin – Settings – General as subscriber instead of contributor.

    @inderlovy

    Participant

    Thank you.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Skip to toolbar