taxonomy terms, inverted

yes it’s because you sort them by name and in order ASCending. because ‘orderby’ => ‘name’, ‘order’ => ‘ASC’ is the default setting. try: $term_names = wp_get_post_terms($post->ID, ‘marcamodelo’, array(‘fields’ => ‘names’, ‘orderby’ => ‘name’, ‘order’ => ‘DESC’, )); and it should be the other way around. here you have documentation of which parameters are possible … Read more

wp_set_post_terms not updating with WP Cron Event

Now Working with Wp Query – Thanks to Milo in the comments add_action(‘cvl_job_status_cron’, ‘cvl_mark_as_expired’); function cvl_mark_as_expired() { global $post; $args = array( ‘post_type’ => array( ‘job_listing’ ), ‘posts_per_page’ => ‘-1’, ‘fields’ => ‘ids’, ‘tax_query’ => array( ‘relation’ => ‘AND’, array( ‘taxonomy’ => ‘cvl_job_status’, ‘terms’ => ‘live’, ‘field’ => ‘slug’, ‘include_children’ => false, ), ), ); … Read more