No Posts in Results Container (Ajax)

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)
Search & Filter Support
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

We also use cookies to store items in your cart as well as allowing your to login on the site.

You can adjust all of your cookie settings by navigating the tabs on the left hand side.

By continuing to use this site, you also agree to our Privacy Policy.