Skip to main content

New answers tagged

0 votes

Blank Screen Edit Page when using Editor Role

Try the following - Conflicting Plugins: While you uninstalled W3 Total Cache, another plugin might be the culprit. Deactivate all plugins one by one and try editing after deactivating each one. This ...
Rushabh Patadia's user avatar
1 vote

How to allow Contributors to edit their own posts, whilst still needing to be reviewed by an admin?

Steps for setting edited posts by contributors to "pending review": 1. Adjust Contributor Capabilities Your modifications to the contributor role are appropriate for allowing them to edit ...
mukto90's user avatar
  • 1,544
0 votes

How to allow Unfiltered HTML in a wordpress multisite install

Similar to @keetbis, but it didn't work so I modified it to this and it worked: add_filter( 'map_meta_cap', function ($caps, $cap) { $user = wp_get_current_user(); if ($cap === ...
ggedde's user avatar
  • 245
0 votes

REST API, get user role?

To get a user's role using the WordPress REST API, you can create a custom endpoint. Here's a brief guide on how to do it: Add Custom Endpoint to functions.php Open your theme's functions.php file. ...
Unknown's user avatar
0 votes

REST API, get user role?

curl --user "USERNAME:PASSWORD" https://HOSTNAME/wp-json/wp/v2/users/me?context=edit Just in case someone ask how to list only the user I am authenticating with.
Anon's user avatar
  • 1
1 vote

How to check if a user is in a specific role?

If your site happens to be using WooCommerce, you can simply use: wc_current_user_has_role( $role ); If not, you can just create the function yourself by copying the way WooCommerce does it (...
Dane Rossenrode's user avatar

Top 50 recent answers are included