Forums › Forums › Search & Filter Pro › No Posts in Results Container (Ajax)
- This topic has 5 replies, 2 voices, and was last updated 6 years, 5 months ago by
Anonymous.
Viewing 6 posts - 1 through 6 (of 6 total)
-
Anonymous(Private) August 14, 2019 at 3:23 pm #219001
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-resultscontainer and pointed to this element via the Display Results tab. Is there a standard WordPressloopthat is suggested for use as thetemplatedisplay?I’m getting the page to load via Ajax but no post content loads?
Thank you!
Trevor(Private) August 15, 2019 at 11:22 am #219048The
<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>'; -
AuthorPosts
Viewing 6 posts - 1 through 6 (of 6 total)