wordpress editor role remove all but ‘menus’ in appearance menu

by default the editor role should not have access to plugins nor appearance menu. But maybe this roles is already customised in your installation? here is a list of editor default capabilities via functions.php you can remove everything in the appearance menu like so: $role_object = get_role( ‘editor’ ); $role_object->remove_cap( ‘edit_theme_options’ ); to remove access … Read more

How to allow user to edit post in wordpress

It would seem like the Basic Authentication Plugin is modifying the contributor user role, removing their edit_posts capability. As you need this plugin activated, I see a couple of options Make a new user role with edit-post capabilities Create a new role that has only the capabilities you need it to have. That way you … Read more

Create Super Admin that cant be deleted

There are 2 approaches to get something equivalent to what you want, but, it isn’t possible to have exactly what you want. On a single site administrator is the highest level, so you can’t have higher than the highest. Instead, here are alternatives: Turn your site into a multisite install that contains only 1 site, … Read more

Prevent Editors from Editing/Deleting Admin Accounts

There is a function WordPress uses called get_editable_roles, which is (I think) used to determine which roles a particular user can edit. The source for this function looks like this: function get_editable_roles() { global $wp_roles; $all_roles = $wp_roles->roles; $editable_roles = apply_filters(‘editable_roles’, $all_roles); return $editable_roles; } So, it looks like you may be able hook into … Read more

Contributor disable seeing others’ posts

I hope you are talking about wp-admin section. If yes just place this code in your functions.php file add_action( ‘load-edit.php’, ‘posts_for_current_contributor’ ); function posts_for_current_contributor() { global $user_ID; if ( current_user_can( ‘contributor’ ) ) { if ( ! isset( $_GET[‘author’] ) ) { wp_redirect( add_query_arg( ‘author’, $user_ID ) ); exit; } } }

How to redirect specific post type with user role

add_action(‘load-index.php’, ‘redirect_dashboard’); function redirect_dashboard() { if ( ! is_admin() || current_user_can(‘activate_plugins’) ) return; $screen = get_current_screen(); if ( is_object($screen) && $screen->base == ‘dashboard’ ) { $url = admin_url(‘edit.php’); wp_safe_redirect( add_query_arg( array(‘post_type’ => ‘product’), $url) ); die(); } }

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)