• twenty twelve theme – Hi i would like to 1. keep all types of users out of admin, as users have their own profile page. 2. certain users with a password are redirected to a page – how can i do this without a plug-in
    thank you in advance
    Melanie

Viewing 1 replies (of 1 total)
  • Thread Starter melanie bund

    (@melanie-bund)

    Hi I have solved the blockig of Admin to users by adding below ode to function.php – if any one is interested
    ‘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;
    }
    }’

    NOW – I still need to direct a single user with editor role to a specific page
    ANY IDEAS
    Thank you in advance
    Melanie

Viewing 1 replies (of 1 total)
  • The topic ‘keep users out of admin and wp-admin/profile’ is closed to new replies.