Forum Replies Created
-
AuthorPosts
-
Ernest Marcinko
KeymasterHi,
This could be possible via a bit of custom code and using a post meta filter, it’s not possible only via configuration.
1. Make sure to use the regular engine
2. Create a custom field filter exactly like this.
3. Make it visible by default
4. 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.add_filter('asp_query_args', function ( $args, $search_id, $options ) { foreach ( $args['post_meta_filter'] as $key => $field ) { if ( $field['key'] ==='dummy_field' ) { $args['post_custom_fields_all'] = false; $args['post_custom_fields'][] = esc_sql($field['value']); unset($args['post_meta_filter'][$key]); } } return $args; }, 10, 3);This will convert the filter into a search field instead.
Ernest Marcinko
KeymasterThank you!
Can you please add temporary SFTP details? I will have to debug through the search process to see where it fails, there is probably an error message which will lead to the solution.
Ernest Marcinko
KeymasterPerfect, thank you!
Ernest Marcinko
KeymasterHi Alícia,
Does the issue go away if the customization is removed?
Ernest Marcinko
KeymasterThanks for the offer Sean!
I do get queries here and there, so we could make it work. Do you have an affiliate system where I could register?
Ernest Marcinko
KeymasterYou cannot access this content.
Ernest Marcinko
KeymasterMake sure that the search by taxonomy terms is enabled, that could explain the issue, it is the most likely cause.v
Ernest Marcinko
KeymasterHi!
Yes – you can have the settins in a different position by using the search settings shortcode. You can basically put it anywhere on the same page and the filters will be moved to that position automatically.
February 7, 2025 at 2:16 pm in reply to: Ajax search result vary with WordPress search result. #52811Ernest Marcinko
KeymasterYou cannot access this content.
Ernest Marcinko
KeymasterYes – for that you should use the priority groups instead, as it is a very specific case, that fits it better.
February 7, 2025 at 2:05 pm in reply to: Ajax search result vary with WordPress search result. #52808Ernest Marcinko
KeymasterThank you, it works now!
It took me a second, but I have actually found a bug. Long story short, there is a shortcut coded to the search if it finds appropriate title based matches up to the results limit (in case of the live search it was 10), then it stops and returns. This works flawlessly, however it should only trigger when the primary results ordering is the default “Relevance”. In your case however it wasn’t that, so it produced these incomplete results on the live search and the correct ones the results page.
I have patched it directly, and will open an issue on the bug tracker so it’s going to be permanently fixed in the upcoming release, so you don’t have to worry about it. The results should be identical now on both ends.
February 7, 2025 at 1:30 pm in reply to: Ajax search result vary with WordPress search result. #52805Ernest Marcinko
KeymasterYou cannot access this content.
February 7, 2025 at 1:20 pm in reply to: Ajax search result vary with WordPress search result. #52803Ernest Marcinko
KeymasterYou cannot access this content.
Ernest Marcinko
KeymasterIn that case set the Terms weight in both cases to Highest and the rest to Lowest, like so: https://i.imgur.com/bLYEHkF.png
Ernest Marcinko
KeymasterHi!
There are two possible approaches to this.
1. Increasing the weight of taxonomy term based matches and decrease the rest. That will generally prioritize keyword matches when the product category matches with the keyword and should push them above the title based matches: https://i.imgur.com/Atah2kj.png
I think this is the best solution, as it applies generally.2. Another possibility is using priority groups. This is a bit more advanced, but here you can select which categories to prioritize for which search phrase etc..
-
AuthorPosts