Support

Account

Home Forums General Issues Filtering WP_Query results by select field Reply To: Filtering WP_Query results by select field

  • in your above code where you have

    
    // the loop
            while ($loop->have_posts()) : $loop->the_post();
    

    wrap the while loop in an if

    
    // the loop
        if ($loop->have_posts()) :
            while ($loop->have_posts()) : $loop->the_post();
              // the rest of while loop
        endif;