Support » Plugin: Posts Order » When I add tax_query args plugin order rewrite my order settings

  • Hi!
    In my posts list i need to give possibility to change several post order types.
    I show several buttons: “Standart order” (using your plugin) and “Sort by views” (used meta_value order).

    For first choise admin set post order type using your plugin.
    In second – i need to set:

    'meta_key' => '_simple_fields_fieldGroupID_1_fieldID_19_numInSet_0',
    'orderby' => 'meta_value_num',

    it’s doesn’t work – your plugin change my order.
    How i can temprorary disable plugin order and use my own sort options in WP_Query?

    • This topic was modified 4 years, 1 month ago by goldaev.
Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi @goldaev, did you find a solution to this?

    I just noticed the same. I’m using the plugin for custom ordering WooCommerce products on category pages, but I have a custom page where I show all categories and a random selection of four products per category (‘orderby’ => ‘rand’), but the plugin is overriding this argument.

    @goldaev, sorry for having latched onto your thread, was just curious if you had found a solution.

    For us it seems to work now, perhaps it was something else causing the issue as we haven’t changed anything with the plugin.

    Well, without changing code of plugin it’s doesn’t work.

    You’re right, I spoke too soon, it’s not working for us either.

    This plugin https://wordpress.org/plugins/post-types-order/ adds a new query argument “ignore_custom_sort”, which can be added to a wp_query http://www.nsp-code.com/advanced-post-types-order-api/sample-usage/. @potreb, would be great if something like this could be added to your plugin as well.

    Yeap, I was forced to change the plug-in code. I added the condition in the plugin file – if my sorting is enabled, I disable plugin initialization. I hope my client will not update the plugin 🙂

    So that sort conditional is generic, rather than tied to a specific set of custom fields? Would you mind publishing what you changed and where in the code?

    If it is generic, perhaps the plugin author can add that code snippet to the plugin.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘When I add tax_query args plugin order rewrite my order settings’ is closed to new replies.