Add unique ID to ajax results

Forums › Forums › Search & Filter Pro › Add unique ID to ajax results

Tagged: , ,

Viewing 3 posts – 1 through 3 (of 3 total)
  • Anonymous
    #161139

    Hello,

    Thanks for the great plugin.

    I am loading results via ajax and I need to add unique ID’s to every result.

    Currently I can increment through the first results loop, but once ajax fires again it resets and I get the same 12 ID’s.

    Is there a way to get the count of the current results displaying and add it to my incrementer?

    Or a completely better way to do this?

    Thanks very much.
    Martin

    Trevor
    #161143

    Do they have to be sequential? Most themes have this problem and instead output the post ID (using get_the_ID() as an ID and/or class.

    Anonymous
    #162013

    Hey Trevor,

    Thanks for getting back to, and thanks for being great and pointing out such a simple fix! I feel a bit silly for not thinking of this. My bad.

    Brilliant support!
    Martin.

Viewing 3 posts – 1 through 3 (of 3 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.