How do I remove the default WordPress editior header for Anspress participants?

4.65K viewsWordPress
0

When I signup as a new user for Anspress (without moderator or admin privileges), I still see a wordpress editor header, however the only link I have permission to view is “Log out”. The other links to my profile take me to a WordPress user profile and not my AnsPress user profile. is there a way I can customize this header and dropdown for my AnsPress participants?

As an example, here’s what i’m seeing below:

1

Hi

if you want remove “admin bar” for all non-admin users, only add this codes at the end of functions.php file in your theme:

/************hide admin bar ************/
add_action('after_setup_theme', 'ap_remove_admin_bar');

function ap_remove_admin_bar() {
if (!current_user_can('administrator') && !is_admin()) {
  show_admin_bar(false);
}
}

Or you want remove access  to wp-dashboard, you need to try this in that file:

add_action('admin_init', 'ap_no_dashboard');
function ap_no_dashboard() {
 if (!current_user_can('administrator') && !is_admin()) {
  wp_redirect(home_url()); exit;
  }
}

 

Or you can use “Theme My Login” plugin!

thanks! I’ll try it the first way. Interesting, I have the “Theme My Login” plugin and I still got the WordPress header. Is there another setting I need to use to configure that?

🙂
simply use first codes (in your child theme)!
Good luck!