Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Filter by YYYY and Search topic in filter
This topic contains 44 replies, has 2 voices, and was last updated by Ernest Marcinko 1 year, 5 months ago.
- AuthorPosts
- November 8, 2021 at 2:35 pm #35459
Hi,
1. Sure, you can do that via a small modification:
function asp_change_print_search_query($query, $search_id) { if ( $search_id == 1 ) { return ''; } else { return $query; } }
Just change the number to the search ID for which you want to apply the code.
2. Well, if you are using an elementor shortcode or similar widget, you could add this HTML code just before the shortcode:
<div class="asp_w asp_sb searchsettings" style="visibility: visible !important; display: block !important"><fieldset><legend>Topic</legend></fieldset></div>
This should basically push the same exact layout as the other labels.
3. That is not possible unfortuantely. Grouping is only available for the live results list when using the vertical layout.
4. The groups order can be set here – where you can also change the position of the “Other results” group.
Best,
Also, you may want to have this option disabled as well.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
November 13, 2021 at 2:12 pm #35535You cannot access this content.November 15, 2021 at 5:20 pm #35567Hi Raj,
So the first option needs to be coded via Elementor. All the plugin does is passes the arguments to the elementor widget to get the items, and then Elementor gives back the output, which the plugin puts back to the page. The output is generated by Elementor, therefore it needs to be coded on that end. I am unfortunately not aware of any hooks on how to modify that.
The second option should be doable. You can use the search results shortcode to place the result somewhere on the same page. You can simply replace the relementor widget with that. If you enable auto populate feature, results will be displayed initially on page load as well. On that layout I recommend turning off this option, so the results box does not close.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
November 16, 2021 at 3:43 am #35571Hi Ernest,
Thanks for the solution.
I have used the results shortcode and removed the Elementor widget also enabled the auto-populate feature and turned off search focus but it not working.
Please check this link http://dev.sightandlife.org/result/ We have followed all the steps which you have asked us to do but it is not loading the result if we choose a filter or type the search term in the search box.
Please help us to fix this.
Thanks and Regards,
Raj.November 16, 2021 at 10:20 am #35574Hi,
You still have an element on the page with the class name “asp_es_5” present on the page: https://i.imgur.com/tATa9J0.png
Best,
The plugin tries to use that as the elementor results container instead of using it’s own results. If you remove that, it should start working.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
November 16, 2021 at 10:44 am #35576You cannot access this content.November 16, 2021 at 10:50 am #35577It is added via Elementor to one of the elementor widgets, I can’t see from the source exactly whihc one. Looks like an Elementor Posts widget, maybe only visible for tablets.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
November 16, 2021 at 11:00 am #35580You cannot access this content.November 16, 2021 at 1:25 pm #35584Hi,
Try setting the redirection to the result page like so: https://i.imgur.com/dG7O5qd.png
result/?asp_s={phrase}&asp_id=5
For the results search, you can turn off the scrollbar as well: https://i.imgur.com/c4MZlM9.png
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
November 16, 2021 at 1:41 pm #35586Hi Ernest,
You are really really so cool.
You are the best plugin developer. Thanks a ton for your prompt response.
I have updated all the settings as mentioned above, for redirect and all but it is still showing the result below the search filed.
Please find the attached screenshot.
Thanks and Regards,
RajAttachments:
You must be logged in to view attached files.November 16, 2021 at 1:44 pm #35589Thank you!
It is probably because of the auto populate. Try turning that off, you may not need it at all, as redirecting to the result page will automatically trigger the search via the filters.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
November 16, 2021 at 1:46 pm #35590Ernest,
I have turned off the auto-populate but it still shows the result below search box does not redirect if I’m clicking the search button after choosing the filter option.
http://dev.sightandlife.org/sal_magazines/
Please do the needful
Thanks and Regards,
Raj-
This reply was modified 1 year, 6 months ago by
anguraj48. Reason: Updated
November 16, 2021 at 3:27 pm #35593Hm, it may need some custom code after all.
Step #1: Change the search button redirection to the same URL as before:
result/?asp_s={phrase}&asp_id=5
Step #2: 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.
Best,add_filter('asp_shortcode_search_options', 'asp_change_on_result_page', 10, 1); function asp_change_on_result_page($args) { if ( get_queried_object_id() == 12276 ) { $args['fe_sb_action'] = 'ajax_search'; } return $args; }
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
November 16, 2021 at 4:17 pm #35595Ernest,
You are so awesome.
It is working now. Thank so you very much!
Probably one lost thing from our end, Is it possible to add “Show more” after each category, which means we are having 10 categories so that for every category we will display 10 results and add show more button and upon clicking we can show more result.
or
Is it possible to add a load more in common after showing 50 results so that users can click show more and view the result?http://dev.sightandlife.org/result/
Awaiting your response.
Thanks and Regards,
Raj.November 18, 2021 at 12:10 pm #35616You cannot access this content. -
This reply was modified 1 year, 6 months ago by
- AuthorPosts
You must be logged in to reply to this topic.