• Resolved peter.bohus

    (@peterbohus)


    Hello,

    plugin works perfect – as expected, but I would like to limit dropdown for only one category or better to get link directly to re-ordering page for that category.

    It is for one role.
    I have created custom menu with links, but I can simulate only:
    edit.php?page=re-orderPost-post
    I add also ‘cat_to_retrive’and ‘taxonomy’ parameters to url, but there will be problem with nounce.

    Can you help me with this specific trouble?

    Thank you in advance Peter

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

    (@aurovrata)

    Hi Peter,

    not sure I fully understand what it is you’re trying to do.

    Are you talking about the dashboard page? In which case you want to limit the ordering access to a specific role or a user?

    Plugin Author Aurovrata Venet

    (@aurovrata)

    Ok, here is a way to achieve this, I have release v1.6 with a new filter that allows you to customise the term query. The query uses the function get_term($array_of_args) and the filter allows you to change the array of args to ensure only the terms you need are returned. See the codex for the valid arguments,

    add_filter('reorder_post_within_category_taxonomy_term_query_args', 'filter_terms',10,2);
    function filter_terms($array_of_args, $taxonomy){
      //make sure you have the right taxonomy.
      if('categories' != $taxonomy) return $args;
      //now change the query args to fit your requirements.
       return $array_of_args;
    }
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Limit to only one category’ is closed to new replies.