Is it possible to restrict a specific user to edit a specific custom post.
Is it possible to restrict a specific user to edit a specific custom post.
Is it possible to restrict a specific user to edit a specific custom post.
how to Specifies an author / editor to edit one category only?
you could try some thing like this. add_action( ‘register_form’, ‘my_register_form’ ); function my_register_form() { ?> <select> <option>Role_1</option> <option>Role_2</option> <option>Role_3</option> </select> <?php }
Users can only save their draft once before saving for revision
Manually change 1 user to a contributor then view their wp_capabilities entry in wp_usermeta table. Update the rest of the table to set wp_capabilities to this value for the 12,000 users.
Your (super) admins will still be able to edit users’ details — it’ll just be a two-step process. First they’ll create the user; then, they’ll go to the new user’s details page (eg, example.com/wp-admin/network/user-edit.php?user_id=[xxx]) to edit the user’s details. I’m not sure I comprehend the second question. Do you require that readers of your online … Read more
I do not in the world know why this works. Yet it does. For future reference… function remove_meta( $query ) { $query->set( ‘meta_query’, false ); } add_action( ‘pre_get_posts’, ‘remove_meta’ );
I guess your custom user role does not have the required capability to assign terms, which in case of the post_tag taxonomy would be edit_post. So one thing to do would be giving it to your role—which is most likely not what you would like to do as this does not only affect assigning terms … Read more
The problem was, that I changed the capabilities AFTER I already created the role. I noticed, that if I change the roles slug, the role became duplicated. So I searched, and found remove_role( ‘tabellenadmin’ ); Add that line somewhere before add_role(). You first have to remove the role, before you can change it.
Have you considered using the get_the_author_meta() function? It would look something like this: if (get_the_author_meta(‘ID’) == ID_YOU_ARE_TESTING_FOR) { // display text } This would need to be used within the Loop.