Support » Plugin: Custom Taxonomy Sort » [Plugin: Custom Taxonomy Sort] How to sort tax_query?

  • I’m a in a Custom Page and I’ve installed Custom Taxonomy Sort plugin (turning off automatic sorting). This is my query (not-sorting):

    	'tax_query' => array(
    			'taxonomy' => 'portata',
    			'field' => 'slug',
    			'terms' => array( 'primi-piatti','secondi-piatti')
      'post_type' => 'ricetta',
      'post_status' => 'publish',
      'posts_per_page' => -1,
      'orderby' => 'custom_sort'
    $my_query = null;
    $my_query = new WP_Query( $args );

    How can I make it works?

Viewing 1 replies (of 1 total)
  • Plugin Author Zack Tollman


    Hi gleenk,

    Custom Taxonomy Sort does not apply to WP_Query. It only applies to when you are querying for taxonomy terms through functions like get_terms.

    Unfortunately, my plugin will be of little use to you in this circumstance; however, I suppose you could use the data stored in the termmeta table to sort the posts only after the query is executed.

    There’s also a chance that you can do what you are trying to do that does not involve my plugin at all.



Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Custom Taxonomy Sort] How to sort tax_query?’ is closed to new replies.