Support » Plugin: ReOrder Posts within Categories » Author capabilities

  • Resolved cnous

    (@cnous)


    Hello,
    First of all, thank you for this extension which corresponds in every way to what I was looking for!
    I tried putting your “reorder_post_within_categories_capability” filter (FAQ # 3) in my “function.php” file to allow “authors” to reorder the article categories, but it doesn’t work.
    Could you please help me?
    Thank you

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Aurovrata Venet

    (@aurovrata)

    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”…

    Plugin Author Aurovrata Venet

    (@aurovrata)

    I ran some tests and the functionality works as expected except if the plugin ‘Disable Gutenberg’ is active.

    Are you using this plugin?

    Plugin Author Aurovrata Venet

    (@aurovrata)

    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.

    Plugin Author Aurovrata Venet

    (@aurovrata)

    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 2 months ago by cnous.
    Plugin Author Aurovrata Venet

    (@aurovrata)

    In my case, but it may also be valid for others (?), I replaced: ‘my-users-posts’ by ‘post’!

    indeed that would help!

    Plugin Author Aurovrata Venet

    (@aurovrata)

    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.

Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.