- This topic has 5 replies, 2 voices, and was last updated 6 years, 10 months ago by .
Viewing 6 posts - 1 through 6 (of 6 total)
Viewing 6 posts - 1 through 6 (of 6 total)
These forums are now closed and remain for historical purposes.
None of the content applies to the new version 3. For support, get in touch via our contact form.
Forums › Forums › Search & Filter Pro › No Posts in Results Container (Ajax)
First I would like to say – love the plugin!
My minor issue is finding the correct way to display posts updated via category through Ajax. (Almost exactly similar to the demo with the movies provided)
I have set a #category-results container and pointed to this element via the Display Results tab. Is there a standard WordPress loop that is suggested for use as the template display?
I’m getting the page to load via Ajax but no post content loads?
Thank you!
The <ul id="category-results"> needs to be outside (before and after) the IF, like this:
echo '<ul id="category-results">';
if ( $the_query->have_posts() ) {
while ( $the_query->have_posts() ) {
$the_query->the_post();
echo '<li>' . get_the_title() . '</li>';
}
} else {
// echo a no results found message here
}
echo '</ul>';