can’t see custom post content filtered under “mine” filter in admin panel

I tried to reproduce what you did. My subscriber role has the following capabilities: delete_messages delete_private_messages delete_published_messages edit_message edit_messages edit_private_messages edit_published_message publish_messages read I marked one of the capabilities “edit_message”. I don’t see this in your picture. But it was absolutely necessary for me to even post messages. Why does it work for you without … Read more

Getting a role based on a localized role name

Just guessing, but maybe: $admin = get_role( __( ‘administrator’ ) ); If you’re trying to make sure that WP translates the string for a specific locale, __() will return the translated string. So if get_role(‘administrator’) works and on a French setup get_role(‘administrateur’) would work, then the above code snippet should do what you need.

Update a users role based on number of posts published

current_user_can() checks for a capability, eg: edit_posts, not a role. The only capabilities subscribers have is read which only gives them access to the dashboard to change their profile (unless you added additional caps). They can’t even publish a post so you will have to start with contributors. $old_role = get_user_meta( $user_id, ‘wp_capabilities’ ); elseif … Read more

if user has a certain role then display image

In your template: // rolename could for e.g. be ‘editor’ or ‘author’ or ‘administrator’ author_can( get_the_ID(), ‘rolename’ ) AND print “<img src=”https://wordpress.stackexchange.com/questions/56658/…” alt=”A kool badge!” />”;

User: Editor, can’t see edit taxonomy screen

Right after I wrote the posts I found it…anyway if someone else is looking for the answer to this, you need to set capabilities when you register your taxonomy. You add the following: ‘capabilities’ => array ( ‘manage_terms’ => ‘edit_posts’, ‘edit_terms’ => ‘edit_posts’, ‘delete_terms’ => ‘edit_posts’, ‘assign_terms’ => ‘edit_posts’ ) edit_posts means administrator’, ‘editor’, ‘author’ … Read more

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