Forum Replies Created
-
AuthorPosts
-
Ernest Marcinko
KeymasterAll right, I have a possible solution!
1. First off, you need to put a custom code snippet into the functions.php file in your theme directory:
add_filter('asp_query_is_search', function($is_search, $wp_query){ if ( isset($wp_query->query_vars) && isset($wp_query->query_vars['asp_override']) ) { return true; } return $is_search; }, 10, 2);This will listen to an additional query parameter and trigger an override to the loop when detected.
2. In your loop template replace these lines:
$args = array( 'post_type' => 'product', // Ensure you're querying WooCommerce products 'post__in' => $product_ids_array, 'orderby' => 'post__in', // Preserve the order from the JetEngine query 'posts_per_page' => -1, // Adjust the number of products as needed );with this:
if ( isset($_GET['p_asp_data']) ) { // Query arguments to signal Ajax Search Pro for override $args = array( 'post_type' => 'product', 'asp_override' => true, ); } else { // Original WP_Query arguments $args = array( 'post_type' => 'product', // Ensure you're querying WooCommerce products 'post__in' => $product_ids_array, 'orderby' => 'post__in', // Preserve the order from the JetEngine query 'posts_per_page' => -1, // Adjust the number of products as needed ); }This will trigger the signal, whenever a live search query is detected.
3. Finally, add the
asp_es_3CSS class to the the product-card loop container, like so: https://i.imgur.com/i927SBK.png
This ensures that Ajax Search Pro knows where the template is rendered so the replacement is made correctly.That’s it, this should do the trick!
Ernest Marcinko
KeymasterSure! No worries, I’m looking at possible solutions on our test servers that’s why I didn’t answer yet. I will let you know in an hour. Looks to be possible from what I can see for now 🙂
Ernest Marcinko
KeymasterHi!
Sure, I will try to assist with this.
If the page is an archive page, then it’s super easy, you can enable the archive page live loader features.
If this is not an archive, then can you let me know how exactly these loops were created? Are they coded directly within the theme via WP_Query or any different solution?
Ernest Marcinko
KeymasterOh, okay!
In that case it would the the best to simply unset the results links via a custom code:
add_filter( 'asp_results', 'asp_custom_link_results', 10, 1 ); function asp_custom_link_results( $results ) { foreach ($results as $k=>&$r) { $r->link = ''; } return $results; }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
KeymasterHi!
The easiest and simplest way to do it is by using this custom CSS:
.asp_r .item { pointer-events: none !important; }This will prevent any clicks on the browser level, without making any modifications on the plugin code.
Ernest Marcinko
KeymasterYou are welcome, thank you for your kind words 🙂 I’m usually not that fast, but I do my best.
You can find the placeholder option here: https://i.imgur.com/yVcCiXU.png
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!
Thank you very much for your kind words and all the details, I really appreciate it!
I quickly logged in and checked the settings, you did a great job, it’s almost set up perfectly. I have went to the index table settings, and selected some of the custom fields to be indexed from the ACF field group, as I assume those are the ones you are looking for.
I tested some of the content after re-indexing, and it seems to be picking up the keywords from those fields now.
January 10, 2025 at 3:45 pm in reply to: want to show author name in filter instead of email. #52450Ernest Marcinko
KeymasterHi,
Thanks for the details, it helps a lot!
If I see correctly the authors are a custom taxonomy “author”. That means that those are the term names. I think the best and safest course of action is to rename them manually in the “author” taxonomy editor – so changing the terms from email to the author names. Ajax Search Pro will automatically show those updated terms.
Ernest Marcinko
KeymasterSure!
I tried that as well on the New Products search, and I’m getting the results in the preview: https://i.imgur.com/B4nvfzN.png
Ernest Marcinko
KeymasterYou are very welcome!
Ernest Marcinko
KeymasterYou cannot access this content.
Ernest Marcinko
KeymasterNot the hosting company, I don’t think they can do anything about this.
This must be caused by either a modification in the .htaccess file, a custom code snippet or a plugin, or maybe even a theme option somewhere – this is not normal WordPress feature.
– If you have added any custom code snippets recently, check those first
– If no luck, try looking up the theme settings, specifically around search features. If there is any option related to that, it should be something like “search permalink structure” or “custom search permalink” or “seo friendly search url” – something like that. I have seen that in a theme before, so it’s a possible cause.
– If still no luck, try switching the theme first, to see if that changes anything.Ernest Marcinko
KeymasterThanks!
I checked the error console, and the plugin script files are not accessible from the cache directory. It was either deleted or the server permissions may have changed.
Please make sure that thewp-content/cacheand thewp-content/cache/aspdirectories exist and the permissions are set correctly to 0755 and are accessible. WordPress automatically generates these, but in some cases if they are deleted, it may no longer have permissions to re-create them.Alternatively, if you can’t change that, then make sure to change these options, which will bypass the cache directory: https://i.imgur.com/8JNhj7w.png
January 6, 2025 at 9:27 pm in reply to: Show posts in results drop-down when associated taxonomy is entered/typed #52439Ernest Marcinko
KeymasterYou cannot access this content.
-
AuthorPosts