Quantcast
Channel: WordPress.org Forums » All Posts
Viewing all articles
Browse latest Browse all 134312

popsantiago on "HT > Display First posts without the default featured image"

$
0
0

Hello,

How can i display in loop (paged) the posts without the default featured image ?
Here is my query of my custom taxonomy template page :

<?php
      	 	$term_region = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) );
      	 	$secteur_id = $_GET["secteur_id"];
if($secteur_id == ""){
      	 	$args = array(
				'post_type' => 'visite',
				'paged' => $paged,
				'tax_query' => array(
					array(
						'taxonomy' => 'regions',
						'field' => 'slug',
						'terms' => $term_region->slug,
						)
					)
				);

         $wp_query = new WP_Query($args);
         ?>

I know this kind of query to display only posts with not the default "thumbnail" :

<?php
      	 	$args = array(
				'post_type' => 'visite',
				'posts_per_page' => 5,
				'meta_query' => array(
					array(
						'key' => '_thumbnail_id',
						'value' => '556',
						'compare' => 'NOT LIKE',
					)
				)
				);			

      	 $wp_query = new WP_Query($args);
		?>

Any idea ?
Thank you


Viewing all articles
Browse latest Browse all 134312

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>