Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Trying to stop JS to add in-line CSS for the .orig class
This topic contains 19 replies, has 2 voices, and was last updated by Pavelescu Razvan 7 years, 11 months ago.
- AuthorPosts
- April 22, 2015 at 5:32 pm #4566
Please go here and test, fill the search fields and click the search icon or hit enter: http://www.citypoppin.com/
Then see the var_dump content from search.php
April 22, 2015 at 5:46 pm #4567That query is the pagination calculation, which is not related. It’s not possible to override the search query to get the results from the ajax search pro, since it works differently.
The plugin does it’s own query, then gets the ID’s of the posts inflicted, then queries these posts as objects. Look for includes/hooks.php for details. The pagination values are set there as well.
Overriding search results is very complicated due to some limitations of wordpress, so be careful with changes.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
April 22, 2015 at 5:53 pm #4570Alright, I got that, sounds logic.
But why nothing appears on the search page when Override is active?
I’ve read the hooks.php search override function but I can’t see where you create the query with the custom fields and where you return the search results
I just want the basic override of search results to work
April 23, 2015 at 11:00 am #4575Everything is passed back to the includes/search/search_content.class.php file, that’s where the query is created.
Then, if you var_dump the $res variable in the hooks.php file, you will see which results you get.
Also, I use to dump the query as well to check for errors and such, line 595 in includes/search/search_content.class.php. The line is already there, you only need to uncomment.
The almost final query is on lines 348-382. Parts within { } brackets are later replaced (like {like_query} and such).
Best,
The results are then post-processed, but this is the main query for both ajax and non-ajax searches.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
April 24, 2015 at 1:19 am #4579Hello!
It worked out!
I’ve saved the $res variable in a global variable and than just parse that global variable when accessing the search.php page: http://screencast.com/t/HMQOpJZKSq
Thanks a lot for the help, I really appreciate it!
I will ask my friend to write a nice feedback in the plugin comments section and also give you 5 stars!
have a nice day,
Razvan - AuthorPosts
You must be logged in to reply to this topic.