• 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

  • The topic ‘HT > Display First posts without the default featured image’ is closed to new replies.