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):
$args=array(
'tax_query' => array(
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?
http://wordpress.org/extend/plugins/custom-taxonomy-sort/
Zack Tollman
Member
Plugin Author
Posted 1 year ago #
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.
Best,
Zack