Taxonomy archive + query attachments = duplicate results

I think the problem is that you’re passing the wrong arguments to the $attachments query, causing you not to get the intended posts in the $attachments query. Here’s what you’re doing: $args = array( ‘post_status’ => ‘inherit’, ‘numberposts’ => 0, ‘post__not_in’ => array_merge($do_not_duplicate,get_option( ‘sticky_posts’ )), ‘post_type’ => ‘attachment’, ); $args[‘tax_query’] = array( array( ‘taxonomy’ => … Read more

Taxonomy and Date in same query?

Take a closer look at the date parameters; you’ll need to enter an integer (number), not a string (text). Simply get rid of the single quotes to make it work: $args = array( ‘post_type’ => ‘job’, ‘tax_query’ => array( array( ‘taxonomy’ => ‘location’, ‘terms’ => ‘dallas’, ‘field’ => ‘slug’ ) ), ‘date_query’ => array( array( … Read more

How to show taxonomy image instead of taxonomy name on a list

i managed to fix it without plugin , just saved in the theme image path pict with taxonomz slug name .png and this code modification <footer class=”article-footer” style=”text-align:center;”> <?php //$terms= apply_filters( ‘taxonomy-images-list-the-terms’, ”, array(‘taxonomy’ => ‘custom_cat’,)); ?> <?php //print_r( $terms); ?> <?php $terms = get_the_terms( $post->ID, ‘custom_cat’ ); $numcat=sizeof($terms); foreach ( $terms as $term ) … Read more