I want to display my custom post types taxonomies by the order I set each item using numbers on the dashboard.
So for example. when I create a new product I can choose one number between 0 - 999 so 0 will be the first and 999 last, these numbers will represent the order of each item on the loop so with this meta_value I can determine which post comes first and which comes after and so on...
so far I have this working code:
$args = array(
'meta_query' => array(
'compare' => '=',
'value' => 1,
'type' => 'numeric',
'orderby' => 'meta_value_num',
'order' => 'ASC'
$args = array_merge( $args , $wp_query->query );
$the_query = new WP_Query($args);
<?php if( $the_query->have_posts() ): ?>
<?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
How do I transform that code and make it sort each item by the number it has in a numerical order respecting the admin chosen number?