Forum Replies Created
-
AuthorPosts
-
Ernest Marcinko
KeymasterYou are very welcome 🙂
If you don’t mind, I will close this topic soon and mark it as resolved, feel free to open another one if you have other questions or issues.
If you like the plugin and have not rated already, feel free to leave a rating on the wordpress plugin repository, it’s greatly appreciated.
Ernest Marcinko
KeymasterHi!
Yes, it should be possible to do with a small custom code snippet:
add_action('wp_footer', 'wp_footer_datepicker_range_fix', 9999); function wp_footer_datepicker_range_fix() { ?> <script> (function($){ setTimeout(function(){ $('.asp_w .hasDatepicker').datepicker('option', 'yearRange', '-100:+100') }, 500); })(jQuery); </script> <?php }Try adding this code via the Code Snippets plugin or 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.
May 14, 2025 at 9:28 am in reply to: How to Show Loading Indicator and Add to Cart Button in Ajax Search Pro #53994Ernest Marcinko
KeymasterYou are very welcome 🙂
I recommend checking this documentation. Especially the index table engine, that can be a game changer when it comes to search speeds.
If you like the plugin and have not rated already, feel free to leave a rating on the wordpress plugin repository, it’s greatly appreciated and helps me tremendously.
May 14, 2025 at 7:23 am in reply to: How to Show Loading Indicator and Add to Cart Button in Ajax Search Pro #53992Ernest Marcinko
KeymasterHi!
1. Yes, by default it should be visible. You can make sure to enable it here, also make sure that the color of the loader is distinctive so it’s visible.
2. Yes, that is also possible via the advanced content field. I recommend checking out this video tutorial, it explains a WooCommerce use case specifically.
Ernest Marcinko
KeymasterYou cannot access this content.
Ernest Marcinko
KeymasterI’m sorry, we are not available for paid live support via calls. I usually answer as soon as I can, within hours when I’m online, otherwise within 24 hours.
What I think we would like to be able to do is give a relative weight to the date in order to help lift recent posts.
I see. Well, that’s not possible out of the box I’m afraid. It might be doable via some custom code, but I’m not sure how complicated it may get. It may get very problematic as you want to somehow add a weight on dates before the query is executed, and that is extremely complicated. You can potentially look at the query related hooks as well as the results hooks, but it’s not going to be that simple.I also believe it has something to do with the fact that it is going through the database to find matches starting with the oldest entries and then moving to the most recent, because of this if it finds an old result that scores the same as a new result it is returning the old result first.
Not really. All the matches are considered the same way, and if the relevance score is the same, then the secondary ordering is used to determine the final order inbetween the the items with the same relevance. However it is very unlikely to have the same relevance score, as it computes the number of full and partial matches, they are weighed etc… It is much more likely that the relevance value comes out higher. Even a single keyword occurence will make a difference in relevance.Instead of trying to custom code and struggle, I would rather make sure that the keyword and the relevance configuration is correct.
– By default the keyword logic should look like this, if it’s different, make sure to change it back.
– If there is no noticable difference, then try to experiment with a bit more strict variation: https://i.imgur.com/vMfYUTz.pngThen consider which field (title, content, custom fields etc..) has the most relevance in your case, and adjust the relevance values accordingly. What I usually do is go with extreme values first, then slowly increase/recuce and observe the changes.
For example, if custom field based matches are significantly more important, then I would start with this configuration: https://i.imgur.com/91RQBFg.png
You can even use 0 values to start off, to see how it looks when only a certain field is prioritized.Ernest Marcinko
KeymasterHi,
The default primary ordering is by “relevance”, which is basically keyword relevance, and therefore it has nothing to do with the post dates. If newer results are priority, then I would first suggest changing the primary ordering by publish date and the secondary by relevance: https://i.imgur.com/7QZ0D2W.png
That will always display matches within each group ordered by date first.If you want to prioritize custom field values over other fields, then you can adjust the relevance values for that here: https://i.imgur.com/0MzyF2N.png
However the relevance will not matter much if the primary ordering is by date descending.Suggested Results Do Not Respect Custom Relevance Logic or Grouping Expectations
I need much more details on this to be able to help. Can you please elaborate which results are not as expected exactly?Ernest Marcinko
KeymasterHi Juan Pedro,
Sure! If I understand correctly, you want to redirect all of the results to the same page. For that you will need a small custom code snippet:
add_filter( 'asp_results', 'asp_custom_link_results', 10, 4 ); function asp_custom_link_results( $results, $search_id, $is_ajax, $args ) { // Replaces each result URL with this $replace_with = 'https://centuryseguros.es/page/url'; // --- DO NOT CHANGE ANYTHING BELOW --- foreach ($results as $k=>&$r) { if ( isset($r->link) ) { $r->link = $replace_with; } } return $results; }Just change the $replace_with variable on line 4 with the URL where you want to redirect the results. If you need help with it, let me know.
Try adding this code via the Code Snippets plugin or 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.
Ernest Marcinko
KeymasterYou cannot access this content.
Ernest Marcinko
KeymasterYou cannot access this content.
Ernest Marcinko
KeymasterHi,
I’m afraid this is not possible – there is only a single configuration for the network. However it might be doable via a custom code:
add_action( 'asp_it_args', function ( $args ) { if ( get_current_blog_id() == 1 ) { $args['index_content'] = 0; } return $args; }, 10, 1 );The custom code above will turn off content indexing for blog ID = 1, change that to the corresponding blog ID.
Try adding this code via the Code Snippets plugin or 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.
Ernest Marcinko
KeymasterYou cannot access this content.
Ernest Marcinko
KeymasterYou cannot access this content.
Ernest Marcinko
KeymasterYou cannot access this content.
Ernest Marcinko
KeymasterYou cannot access this content.
-
AuthorPosts