Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Results page
- This topic has 10 replies, 2 voices, and was last updated 9 years, 2 months ago by
yaya.
-
AuthorPosts
-
March 8, 2017 at 1:04 pm #12203
yaya
ParticipantHi,
Nice module!
But, how can i enable a search results page? when add a keyword and click on search i always get a note that there are no results.
Please advice! Thanks!
March 8, 2017 at 1:24 pm #12204Ernest Marcinko
KeymasterHi!
Thank you for your kind words!
By default the plugin does not override the default wordpress core results, but you can enable that option on the General Options -> Logics & Behavior panel. For more info check these chapters in the documentaion:
– Results page override
– Search box behaviorSome themes might not support results override, but it’s worth a try for sure.
March 8, 2017 at 4:38 pm #12207yaya
ParticipantHi,
Thanks for your answer, i followed the instructions but i still get the same empty results, the live search works very well.
We work with visual composer.
March 8, 2017 at 4:40 pm #12208yaya
ParticipantYou cannot access this content.
March 8, 2017 at 4:41 pm #12209Ernest Marcinko
KeymasterHi,
It probably means that either the theme (or another plugin) has a separate override method for the results page, which cannot be replaced.
If you can fill the ticket with temporary FTP and back-end access, I might be able to check.
March 8, 2017 at 5:10 pm #12210Ernest Marcinko
KeymasterHi,
Thanks for the details, I see what the problem is now.
So looking at the search.php file in your theme directory, there is the problem. The override works, the results are passed to the results page, instead of printing the results there is a code looking for a specific template page (page id = 1751). I’ve looked up that page and that has a shortcode, which is then executed and its content is then printed. However that shortcode uses it’s own method (executed long after the override) to get the results, it does not get the ones that are already overridden, and that is later printed to the results page by your custom code.
March 8, 2017 at 5:14 pm #12211yaya
ParticipantHi Ernest,
Thank you for your quick support and explanation!
But is there a way to fix this issue?
Thanks!
March 8, 2017 at 5:15 pm #12212yaya
ParticipantWhat if i replace the search.php file with the default one?
March 8, 2017 at 5:27 pm #12213Ernest Marcinko
KeymasterIt depends, if it has some kind of custom query by default, it might still override the results passed by ajax search pro. If you find statements like ‘query_posts(…)’ or ‘get_posts(…)’ within that file, then they will most likely negate the override, and are very bad practice – as the results are already queried.
March 8, 2017 at 5:46 pm #12214yaya
ParticipantOke, what do you advice to contact the theme makers?
March 8, 2017 at 5:53 pm #12215yaya
ParticipantI think i fixed the issue.
changed a row in blog.php file
‘post_type’ => ‘post’,
‘post_type’ => (is_search() ? array(‘post’,’page’) : ‘post’),
-
AuthorPosts
- You must be logged in to reply to this topic.