Hi Trevor,
Thank you for your reply. I don’t know if you can call it an ‘own results template’ because in the settings you set a class, in my case .list, to show the results when you use the filter. I do have my own template for the loop to show the initial posts. Can I show you this template:
<?php
$custom_terms = get_terms('alfabet');
if (!empty($custom_terms)) {
foreach($custom_terms as $custom_term) {
wp_reset_query();
$args = array(
'post_type' => 'bontvrijlijst',
'search_filter_id' => 7242,
'posts_per_page' => -1,
'orderby'=> 'title',
'order' => 'ASC',
'tax_query' => array(
array(
'taxonomy' => 'alfabet',
'field' => 'slug',
'terms' => $custom_term->slug,
),
),
);
$loop = new WP_Query($args);
if($loop->have_posts()) {
echo '<div id="' . $custom_term->slug . '" class="alfabet-letter-wrap"><div class="alfabet-letter">'.$custom_term->name.'</div><ul class="members">';
while($loop->have_posts()) : $loop->the_post();
$company_link = get_field('url');
echo '<li class="member"><a href="'. $company_link .'" target="_blank">'.get_the_title().'</a></li>';
endwhile;
echo '</ul></div>';
}
}
} else {
echo '<p><strong>Er zijn geen bedrijven die voldoen aan deze zoekopdracht. Probeer het opnieuw.</strong></p>';
}
?>
When there are no results I don’t get the ‘else’ message and in the console I see an error that the main.js file is not found. I don’t know if I can use a link in the reply message but the page is: http://joemarque.nl/dev/bvd/bontvrijlijst-test/.
Maybe you can see what I am doing wrong.
Best regards,
Joeri.