Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Few questions
- This topic has 7 replies, 2 voices, and was last updated 4 months, 2 weeks ago by
nikolab86.
-
AuthorPosts
-
April 15, 2021 at 12:00 pm #32739
nikolab86
ParticipantHi,
I have a few questions regarding Ajax Search pro.
The first one, I’ve noticed that you have Analytics of the most searched words/terms and I can add/post proposed words just below the search bar, but it has to be added manually. Is there’s a way to pull automatically those words based on the analytics, so to show the first 3 most searched terms?
The second one is that when I type in the search bar the search results are automatically displaying, but when I click on the X button it removes the typed word but it doesn’t remove/resets the shown results. How can I set that, and if it’s a bug when you’ll fix/update it?
Please refer to the files attached.
Thanks,
NikolaApril 15, 2021 at 12:55 pm #32746Ernest Marcinko
KeymasterHi,
1. I’m afraid there is no option to do that, however you can modify the words displayed there via the asp_suggested_phrases hook.
2. That is an intended behavior, but there might be a way to trigger an empty search when clicking on the icon via a custom code.
Try adding this code to the functions.php file in your theme/child theme directory – make sure to have a full server back-up first for safety. For more details you can check the safe coding guidelines.
add_action('wp_footer', 'wp_footer_empty_on_close'); function wp_footer_empty_on_close() { ?> <script> jQuery(function($){ $('.asp_m .proclose svg').on('click touchend', function(e){ $(this).closest('.asp_m').find('input.orig').trigger('input'); }); }); </script> <?php }April 15, 2021 at 1:25 pm #32747nikolab86
ParticipantHi Ernest,
Thanks a lot for a quick reply.
Reset on the X button worked : )I’ve checked the asp_suggested_phrases hook, where can I check the analytics to pull data from? Do you have it somewhere in the documentation where I can refer to?
Thanks once again.
Regards,
NikolaApril 15, 2021 at 2:41 pm #32750Ernest Marcinko
KeymasterYou are welcome. Unfortunately there is no technical documentation, but the class file can be found here: wp-content/plugins/ajax-search-pro/includes/classes/etc/statistics.class.php
You can use the getTop method to get the top keyords:
$keywords = asp_statistics::getTop($number, $searchid, true);April 15, 2021 at 2:44 pm #32751nikolab86
ParticipantGreat, I’ll check it.
Thanks a lot, Ernest.April 28, 2021 at 3:20 pm #32980nikolab86
ParticipantHi Ernest,
I have a few more questions:
1. Is it possible to search for current page content that isn’t any CPT, post, or product, just regular content, for example FAQ (title and text)
2. I’ve added a search id as a class to the section which is a Tab element, but when I’m searching, it doesn’t update, live search isn’t updating my content. I assume that this is happening because the content is in the Tab element, and by the way, I’m using Elementor.Thanks
April 29, 2021 at 6:46 am #32989Ernest Marcinko
KeymasterHi,
1. Do you mean like return parts of the page as individual results? That is not possible.
2. I need to see in order to be able to tell what is wrong. Can you send a link where I can take a look at this?
January 20, 2026 at 4:51 pm #56808nikolab86
ParticipantHi Ernest,
I’m trying to create grouped search results on the Elementor Search Template.
For now, I’ve added two Loop Grids, one is for posts, the other one is for FAQ (CPT). I’m planning to add more in the future.
When I add a class name from the search to them to enable live search, it doesn’t work as expected.
Is it possible to achieve to have different grouped search results on the page?Thanks,
Nikola -
AuthorPosts
- You must be logged in to reply to this topic.