Tag Info

Hot answers tagged


Try to change: <?php if ( have_posts() ) To <?php if ( $verhuurd_query->have_posts() )


The function have_posts is for the main loop, so the if statement is checking the main loop, which will probably always have posts. You want to use the custom query's have_posts for the if statement instead. if ( $verhuurd_query->have_posts() ) : while ( $verhuurd_query->have_posts() ) : $verhuurd_query->the_post(); ?>

Only top voted, non community-wiki answers of a minimum length are eligible