Sfoglia il codice sorgente

:recycle: altering taxonomy query to check for just existence

tags/0.9.0
J 4 anni fa
parent
commit
313f85fcb3
1 ha cambiato i file con 1 aggiunte e 3 eliminazioni
  1. 1
    3
      plugins/cia-endpoints/includes/class.make-sortby.php

+ 1
- 3
plugins/cia-endpoints/includes/class.make-sortby.php Vedi File

98
         $taxonomy = $this->post_type . '_type';
98
         $taxonomy = $this->post_type . '_type';
99
         if($this->post_type == 'post') $taxonomy = 'category';
99
         if($this->post_type == 'post') $taxonomy = 'category';
100
 
100
 
101
-        $tax_id_array = $this->make_terms_array($taxonomy, 'ids');
102
         $args['tax_query'] = array([
101
         $args['tax_query'] = array([
103
             'taxonomy' => $taxonomy,
102
             'taxonomy' => $taxonomy,
104
-            'field'    => 'term_id',
105
-            'terms'    => $tax_id_array,
103
+            'operator' => 'EXISTS'
106
         ]);
104
         ]);
107
 
105
 
108
         $q = new WP_Query($args);
106
         $q = new WP_Query($args);

Loading…
Annulla
Salva