Do you want to set the edit limit on their post?

Do you want to set the edit limit on their post?

Signifying a few things, in reality, makes a positive or negative structure. Have been in a role as a multi-author? The multi-author is the one who has their post on multiple websites or sometimes, they pretend to the guest to their post. Each has the responsibility to do their works likewise, here we set the multi-author to stop viewing other authors' articles before they get published.

WordPress won't recognize the user role so; it automatically allows the user to display all the posts and pages. Whoever you are! Maybe the administrator, contributor, editor, and author – have all the rights to view the WordPress post and pages. If the author is reliable in a team or company it won’t be a bigger deal. You can ask the question “Why do you want authors to have limitations in their posts?” Yes! It may be a bigger advantage in some situations.

Let’s start the steps:

Without making any changes to the editing code, you can allow the author to view the page alone. Use the plugin “PublishPress Permissions” – it’s a new free plugin available in the market for a long day. With this plugin, you can manage or set some limitations for writing your post. There is also a premium version called “PublishPress Pro” which allows you to manage the settings of permission in default.

Step 1: Search for the plugin in the dashboard “PublishPress Permissions”. Activate the plugin so that only the authors can view the post of their own. In case, if you use another author account for logging in WordPress admin panel then you will find the post that they posted and not yours.

Also, it's possible to allow the editor to view WordPress posts. Using the plugin “PublishPress Permissions” you can only allow administrators to view the post. You would have known the role of editors who proofread guest posts and other writers' posts before publishing. This plugin allows the administrator to view their post but not others. Again, here is another plugin called “PublishPress Capabilities” discovered by the team of PublishPress available and free to use in the market. As said, it has a pro version called “PublishPress Pro”.

Step 1: Install and activate the plugin “PublishPress Capabilities”. Activate the plugin and go to the menu of the WordPress admin area where you can see the option called “Capabilities”.

Step 2: To change the role for multiple or different users, kindly go to the page “Role Capabilities”. At the corner of the left, you have a dropdown option where you can set or edit the role. If you want the editors to make changes in others’ posts, go to the settings “Editing Capabilities” there you have the default selection in "Editor” and also check for another option “Edit others”. This helps to make changes in others’ posts.

Step 3: Move down to the section “Additional Capabilities” check and enable the option “List others posts”.

By doing this way, you can easily editor can see other’s posts from their role in WordPress. Do save all the changes made till now and log in as the editor for a recheck.

How to add custom code to your WordPress theme?

In your theme file, just by adding the custom code, an editor can view other posts. You may have any one file among site-specific plugins or functions.php. Add the below code to your theme file.

Code:
function posts_for_current_author($query) {
global $pagenow;
if( 'edit.php' != $pagenow || !$query->is_admin )
return $query;
if( !current_user_can( 'edit_others_posts' ) ) {
global $user_ID;
$query->set('author', $user_ID );
}
return $query;
}
add_filter('pre_get_posts', 'posts_for_current_author');
The permission will be granted once you add this code to your theme file so that editor can see the post of all. Author or contributor can see their post with the help of this code. Using the custom user roles, the dashboard will be listed with the editor who makes edits to others’ posts.

What other limitation?

Once you set the limitation, automatically an editor will have the privilege to view, edit or delete the post. Use the plugin “PublishPress Permissions” you can decide on your own to post displayed on the first and second.

Step 1: Install and activate the plugin “PublishPress Permissions”. Select the page, go to “WordPress block editor” and scroll below.

Step 2: There you can see the meta box, “Permissions: Edit this post”. Choose the option “Blocked” after selecting the user roles. The default option is Yes over here. Just before leaving the page, check whether the default is Yes and it's enabled.

After then, update the blog post without fail only so, that the changes will be applied.
Author
kumkumsharma
Views
2,091
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from kumkumsharma

Top