Forum Replies Created
-
AuthorPosts
-
February 21, 2025 at 1:49 pm in reply to: Elementor loops in live search breaking with the ajax filters #53034
Ernest Marcinko
KeymasterYou are very welcome!
Oh, I’m sorry, I didn’t click that one, but the other ones, so I didn’t notice that.
Okay, that seems to be not hooked correctly and does not re-initialize. There is still hope, after running
elementorFrontend.init()manually in the console it works again, so I guess all you need is a hook to do that after each search. This should do the trick:/** * Reinit Elementor after results are replaced */ add_action('wp_footer', function () { ?> <script> window.addEventListener("load", () => { document.querySelectorAll(".asp_main_container").forEach((el) => { el.addEventListener("asp_elementor_results", () => { elementorFrontend.init() }); }); }); </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.
February 21, 2025 at 1:31 pm in reply to: Elementor loops in live search breaking with the ajax filters #53031Ernest Marcinko
KeymasterHi,
After the filtering is finished the plugin fires the elementorFrontend.hooks.doAction(‘frontend/element_ready/loop-grid.post’) hook, where the custom scripts should be subscribed to for initialization so after the live resplacement they are re-rendered.
It looks like it’s coded that way, as when I select/deselect I’m getting the same layout with the tooltips as well: https://i.imgur.com/L4DOZ22.png
In the first case it’s broken because there are no results in the Loop and therefore Elementor does not load the loop styling at all, if you load up the page with results, it works. I think it’s their conditional CSS loader feature, I believe it can be turned off on the back-end. Or, if there are results initially, Elementor will load the styles.
Ernest Marcinko
KeymasterHi!
Usually drop-downs are native to the browsers and are very hard to actually style. What I notice from the screenshot that the drop-down arrow is missing, that could be coming from a 3rd party custom CSS.
Can I take a look at this somewhere? I might be able to suggest based on the exact layout. Thank you!Ernest Marcinko
KeymasterYou cannot access this content.
Ernest Marcinko
KeymasterHi,
While the image didn’t came through, I suspect you are reffering to this layout issue.
It is caused by a delayed styles script. The search styles are correctly enqueued, but I suspect you might be using some sort of a “performance enhancer” plugin, which captures and delays the style loading, causing the search style to break for until it’s styles are fully asynchronously loaded.
I strongly discourage delaying asset loading, as it may cause issues like this as the normal loading is disrupted. Unless you know how to extract critical styles to be pre-loaded to avoid these hickups, I don’t recommend enabling that feature.
Make sure to check your cache/performance enhancer plugin and disable delayed style loading, it will resolve the issue.
Ernest Marcinko
KeymasterHi,
The best course of action is usually to have items that can be assigned to multiple items as taxonomy terms. I would suggest the type, model, engine, status as custom taxonomies and the rest as custom fields: year, moved, price – so you can create a range slider or numeric input filters on them. That should give you the best possible architecture and it’s going to be future proof.
Ernest Marcinko
KeymasterSure!
It depends on your theme as well, but usually there are multiple ways to do that:
– If you theme has a shop page editor or a block editor, then you can place the search shortcode[wd_asp id=1]above the shop section (into a shortcode block) and the search settings shortcode to the sidebar.
– If the theme has widgetize areas around that section, you can also use the search widgets or editor blocks.
– If there is no suport for adding either of those, you can still place the plugin shortcode into the theme files directly.I suspect your theme has an editor, usually all modern themes have some sort of a block editor for that.
Ernest Marcinko
KeymasterYou cannot access this content.
February 20, 2025 at 2:06 pm in reply to: Why the search results are regenerated when clicking the back button #53004Ernest Marcinko
KeymasterYou cannot access this content.
Ernest Marcinko
KeymasterHi Samuele,
'allow_missing' => trueshould do the trick. It will allow results where the custom field does not exist and apply the filter where it does.February 20, 2025 at 10:17 am in reply to: Why the search results are regenerated when clicking the back button #52991Ernest Marcinko
KeymasterYou cannot access this content.
Ernest Marcinko
KeymasterI’m afraid no – the documentation page is not a WordPress website, it’s a custom built NextJS application.
That type of layout is not possible unfortunately.
Ernest Marcinko
KeymasterYes – not a shortcode but an option. You are looking for the compact search layout feature.
Ernest Marcinko
KeymasterYou cannot access this content.
February 19, 2025 at 7:43 pm in reply to: Why the search results are regenerated when clicking the back button #52977Ernest Marcinko
KeymasterYou cannot access this content.
-
AuthorPosts