Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Results Variable
This topic contains 5 replies, has 2 voices, and was last updated by Ernest Marcinko 6 years, 10 months ago.
- AuthorPosts
- May 6, 2017 at 3:53 pm #13002
Hi WP Dreams Team,
I’m just wondering which object contains the list of results ?
Because I would have like to use the total list of results.
I found that there is an object called “data_response” ? It is in the 2 jquery.ajaxsearchpro files (normal and scoped).
But it doesn’t work I can’t call if from an other script. I removed “var” in front of it to make it global but still it doesn’t work.
I want to do that because I need to show more results. Currently I’m stuck with 10 results and increasing the total of results to show when populating the list doesn’t work at all 🙁
I wanted to have a bigger list because on the right I have a map (look at this page : /fr/notre-selection-food/) which is based on the result list and show markers. I wanted to show the entire list of results on the map and not necessarelly all in the actual results.
Thanks in advance for your help.
Thomas
May 9, 2017 at 11:29 am #13027Hi Thomas,
Perhaps using the Auto Populate feature under the Layout Options -> Search box layout panel might help you: https://i.imgur.com/4eYXEX2.png
It’s a feature to display results initially on page load, where you can set a different limit from the default one. I’m not sure if this is what you are looking for though.
I would not recommend changing the script for this purpose though, there might be a better way to get around it. There are filters available to change the search phrase and the results via PHP, that might be a better option. Let me know if the auto populate is not working out, and I will look into it.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
May 10, 2017 at 5:45 am #13033Hi,
Thanks for your answer. the thing is that the auto populate works but it’s limited to 10. If I change to 20 it doesn’t work, I still have 10 🙁 You can try on my account I gave you access.
So that’s why I was wondering if I can get the global object easily. I don’t want to change your scripts. I just want to read in console the global object and use it to make the display of all markers that matched the search on the map 🙂 I don’t really need to populate with all results. The more important is for me to ensure that everything appear on the map.
I know the map has nothing to see with you. But I’m just asking for the global object that contains the list of result. The one where the results are stored.
Thanks in advance
Thomas
May 10, 2017 at 11:34 am #13037Oh, I see it now, indeed, that option is not working correctly. That is a new issue, that nobody else noticed before.
I’ve looked up the code, and it accidentally takes the value set on the General Options -> Limits panel. If you change the limit there, it should solve the problem, without making changes to the code, or using custom code: https://i.imgur.com/PfbCUsx.png
I will make sure to fix this for the upcoming release.
I hope this helps!
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
May 16, 2017 at 4:35 am #13122Awesome ! Thanks 🙂
May 16, 2017 at 10:56 am #13126You cannot access this content. Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
- AuthorPosts
The topic ‘Results Variable’ is closed to new replies.