Resources

My Agape try

Your Agape try


Support Forum

You must be logged in to post Login Register

Search 
Search Forums:


 




How can I hide the dashboard

UserPost

1:47 am
July 13, 2011


mirefoot

New Member

posts 1

1

I have succesfully installed role scoper with simplr user registration form and I can succesfully get registrations that apply the correct role to the new user.

When that user logs in to the login form I would like to send them straight to the front page of the blog/site rather than to the dashboard.

How do I do this please?

7:08 am
July 13, 2011


Kevin

Admin

posts 2503

2

11:30 am
July 20, 2011


whiteorb

Member

whiteorb

posts 49

3

You can also force disable it with this function.

//Disable dashboard for specific roles.

function wpse23007_redirect(){

  if( is_admin() && !defined('DOING_AJAX') && ( current_user_can('A ROLE') || current_user_can('ANOTHER ROLE'))){

    wp_redirect(home_url());

    exit;

  }

}

add_action('init','wpse23007_redirect');



About the Agapetry forum

Currently Online:

12 Guests

Maximum Online: 150

Forums:

Groups: 2

Forums: 7

Topics: 1247

Posts: 5656

Members:

There are 1259 members

There are 1 guests


Kevin has made 2503 posts

Top Posters:

metal450 - 178

Ragnar - 108

YikYak - 70

whiteorb - 49

Daisy - 35

Administrator: Kevin | Moderators: Kevin