Forum Replies Created
-
AuthorPosts
-
Ernest Marcinko
KeymasterIf the WPML compatibility is enalbed the plugin will always show only the results within the current language – so in that case you don’t need to exclude anything at all.
If the translations for the desired content will exists for that language, then it should work without exclusions.Ernest Marcinko
KeymasterHi,
Thank you for the details!
From the page source it seems as if the settings initializer script is missing for some reason. Can you please try changing this option to see if that helps?
Ernest Marcinko
KeymasterYou cannot access this content.
September 22, 2023 at 1:35 pm in reply to: show blog and products in search results with different layouts #45492Ernest Marcinko
KeymasterHi,
Do you mean the results on the results page?
I’m afraid that is only possible by editing the theme. The WooCommerce results page will automatically remove anything that is a product. The regular results page however may not display the add to cart button. Unfortunately the plugin can not affect that, it is purely rendered by the theme you are using.
Theoretically if everything were to be rendered on the regular results page (not the WooCommerce one), that should be custmomizable to display everything as you like – but that is definitely not an easy task.Ernest Marcinko
KeymasterYou cannot access this content.
Ernest Marcinko
KeymasterHi,
Thank you very much for the details, it helps greatly!
My guess is that category ID conflicts might be happening here. I think the best course of action would be to make another search bar, and use the first on the english and the second on the german version.
On the back-end, you can switch languages – so you can configure each search bar in the current language, that should avoid any conflicts. Then use each on the corresponding language.Let me know if that changes anything!
Ernest Marcinko
KeymasterHi,
The results page is completely controlled by your theme, search plugins can’t change that. If you are using Divi, try checking their documentation about that, or asking their support – it is probably possible as Divi is a very versatile theme.
Ernest Marcinko
KeymasterYou cannot access this content.
September 21, 2023 at 2:17 pm in reply to: How to customize the shortcode for specific results #45480Ernest Marcinko
KeymasterYou cannot access this content.
Ernest Marcinko
KeymasterYou cannot access this content.
Ernest Marcinko
KeymasterThose numbers just basically show how many elements (posts or other post types) are associated with them. If it shows 0 – then it means, there are no items associated with that category, therefore filtering by it will return nothing as well.
You can assign these categories to the posts on the post editor panel.September 21, 2023 at 2:08 pm in reply to: Shortcode does not work to display search properly #45477Ernest Marcinko
KeymasterHi,
Unfortunately the screenshots were not attached, but I think I still know what the issue is.
If the layout of the form is different on the front-end and the back-end, especially if it shows the “original” default style or it is not changing, that is 99.9% of the time caused by cache. Clearing all layers of cache including page, CDN, minify, styles and scripts will very likely resolve the problem.
Ernest Marcinko
KeymasterYou cannot access this content.
Ernest Marcinko
KeymasterYou cannot access this content.
Ernest Marcinko
KeymasterYes, of course 🙂
Here you go:
// Remove the line below, if you don't want to affect the Live results list add_filter( 'asp_results', 'asp_custom_link_results', 10, 4 ); // Remove the line below, if you don't want to affect the results page add_filter( 'asp_noajax_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://google.com'; $apply_to_search_ids = array(2); // Search IDs to apply the code to // --- DO NOT CHANGE ANYTHING BELOW --- if ( in_array($search_id, $apply_to_search_ids) ) { foreach ($results as $k=>&$r) { // Ajax results link if ( isset($r->link) ) { $r->link = $replace_with; } // Results page link if ( isset($r->asp_guid) ) { $r->asp_guid = $replace_with; } } } return $results; } -
AuthorPosts