Did you copy the code in FAQ #3 as is? Do your authors have the publish_posts capability?
Thread Starter
cnous
(@cnous)
Yes and yes…
Authors have access to “Posts” (“All posts” and “Add”), but not to “Categories” and not to “Reorder”…
I ran some tests and the functionality works as expected except if the plugin ‘Disable Gutenberg’ is active.
Are you using this plugin?
There is a bug on the disable gutenberg plugin that causes the sub-menu page to break on Posts reorder pages. I have raised a bug report on that plugin.
I introduced a work around this issue in v2.9.4, and the sub-menu should now work
Thread Starter
cnous
(@cnous)
Thank you for your replies (and your work).
It still doesn’t work with this new version, but I found the problem.
In my case, but it may also be valid for others (?), I replaced: ‘my-users-posts’ by ‘post’!
Which give :
add_filter (‘reorder_post_within_categories_capability’, ‘enable_editors’, 10,2);
function enable_editors ($ capability, $ post_type) {
// you can filter based on the post type
if (‘posts’ == $ post_type) {
$ capability = ‘publish_posts’; // Author role.
}
return $ capability;
}
And it works now.
Thanks again.
P.S. : I’ll send you some French translations…
-
This reply was modified 5 years ago by
cnous.
P.S. : I’ll send you some French translations…
ca serait super, merci! Les traductions sont maintenant gerees directement sur le site WordPress …. voir cette page.