WordPress Hide Menu On Backend for Author

WordPress Hide Menu On Backend for Author

This script about how to hide menu dfads or Ads plugin on wordpress backend from author only

ok just do it first edit /wp-content/themes/yourtheme/functions.php

function hide_custom_post_type_for_authors() {
if (current_user_can(‘author’)) {

remove_menu_page(‘edit.php?post_type=dfads’);
}
}
add_action(‘admin_menu’, ‘hide_custom_post_type_for_authors’, 100);

if you want to hide another plugin just change dfads on top script

and how to find nick name plugin just open setting in plugin backend and see url address

like this example :

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *