Programming
We provide developers and engineers the guides and tutorials they...
Search
We provide developers and engineers the guides and tutorials they...
Content is king. It's not just about how you're going to write, b...
Looking for an engaging connection with thousands of other people...
If you're running a blog or a magazine & want your authors not to directly publish posts on your blog or magazine, simply put the following code in your functions.php & your problem is solved.
If you're running a blog or a magazine & want your authors not to directly publish posts on your blog or magazine, simply put the following code in your functions.php & your problem is solved.
function remove_author_publish_posts(){
// $wp_roles is an instance of WP_Roles.
global $wp_roles;
$wp_roles->remove_cap( 'author', 'publish_posts' );
}
add_action( 'init', 'remove_author_publish_posts' );It removes the capability from author to publish posts directly & change the value of the publish button to "Submit for review" for the administrator.
Try it yourself & let us know if you get stuck at any point.