Forums Forums Search & Filter Pro No Posts in Results Container (Ajax)

Tagged: , ,

Viewing 6 posts - 1 through 6 (of 6 total)
  • Anonymous
    #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-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!

    Trevor
    #219006

    Are you able to send me a live link/URL to your search page so I can take a look?

    Anonymous
    #219008
    This reply has been marked as private.
    Anonymous
    #219012
    This reply has been marked as private.
    Trevor
    #219048

    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>';
    Anonymous
    #219060

    Fantastic, thank you! I really appreciate it

Viewing 6 posts - 1 through 6 (of 6 total)