Forum Replies Created
-
AuthorPosts
-
February 12, 2025 at 12:29 pm in reply to: It is possible to display pdf content in elementor loop grid. #52921
Ernest Marcinko
KeymasterYou cannot access this content.
Ernest Marcinko
KeymasterYou cannot access this content.
Ernest Marcinko
KeymasterUpdate
I have made a quick patch to this and included in the core plugin. I have installed this patched version on your website, this fix will be included within the next update.
I have also removed the code as it is no longer neccessary, the plugin detects the duplications now.
Also made a small change in the theme header php file so the simple shortcode is now used correctly.
Ernest Marcinko
KeymasterHi,
Thank you for the details!
The issue was caused by a node duplication in the header – it looks like the menu script creates duplicates of some of the elements. That should never be done as duplicating nodes lead to duplicated IDs, invalid HTML and possible issues within anything that uses javascript. Unfortunately some theme/menu developers still do this, despite the fact that it is a very bad practice.
While the issue is not caused or relates to our plugin, I was able to find a possible solution, I have added the following code snippet to the functions.php file:
add_action('wp_footer', function () { ?> <script> window.addEventListener("load", () => { const instances = ASP.instances.get(1); if ( typeof instances[1] !== 'undefined' ) { instances[1].destroy(); } }); </script> <?php });This will remove the duplicated search and will resolve the issue. Still, I strongly recommend investigating why elements are being duplicated to a separate node in the header, and if it’s possible then stop it alltogether to avoid any issues.
Ernest Marcinko
KeymasterI think so. It sounds like that the number of results might be restricted to 50 on the results page. Can you please check and increase it here: https://i.imgur.com/njMFqaX.png
Ernest Marcinko
KeymasterYou cannot access this content.
Ernest Marcinko
KeymasterYou cannot access this content.
Ernest Marcinko
KeymasterHi Nestor,
Not at all, you should rather keep it active as after deactivation there is a 30 minute grace period to re-activate 🙂
Ernest Marcinko
KeymasterYou cannot access this content.
Ernest Marcinko
KeymasterYou cannot access this content.
Ernest Marcinko
KeymasterYou are very welcome Alícia 🙂 No worries!
Ernest Marcinko
KeymasterYou cannot access this content.
Ernest Marcinko
KeymasterHi,
1. I want to have the search icon at the front of the search field that will not open anything on the other search pages when users click it.
You can change that behavior here: https://i.imgur.com/HN7xyOF.png2. How to do the type of filter I circled in the attachment I sent.
You can either use the range slider or a numeric range type of filter: https://i.imgur.com/eNd4nqR.pngThe width of the filters container is auto-adjusted based on the container width. If you set the width on the elementor container, it will follow that.
I would love to let the dropdown show when a particular text “Filter Search” is clicked on then the dropdown will appear
Theoreticall it could be possible with a bit of custom coding via the plugin javascript API, it shouldn’t be very difficult.ASP.api( 1, 'toggleSettings' );So I recommend adding a button, link or whatever you prefer and using a javascript function to attach an event handler to that. For example, assume this button is placed anywhere on the page:
<button id="asp-settings-toggle">Toggle Settings</button>And a javascript event handler like below. This goes into either the functions.php file or into a code snippets plugin (PHP):
add_action('wp_footer', function () { ?> <script> window.addEventListener("load", () => { document.querySelector("#asp-settings-toggle").addEventListener("click", (event) => { event.preventDefault(); ASP.api( 1, 'toggleSettings' ); }); }); </script> <?php });Simple like that. I can’t guarantee anything as this is beyond normal support, but it should work, as far as I tested it was working. If you need help with customizations I recommend either wpkraken, they are experienced with customization works and extending functionality to our plugin.
Ernest Marcinko
KeymasterThanks!
The issue is caused by the custom code as it uses the “yoast_get_primary_term_id” function, but the Yoast SEO plugin is disabled, so that no longer exists. I made a modification to it to check if the function exists first:
add_filter( 'asp_results', function ( $results, $id, $is_ajax, $args ) { foreach ( $results as $r ) { if ( function_exists('yoast_get_primary_term_id') ) { // Intenta obtenir la categoria principal amb Yoast $main_term_id = yoast_get_primary_term_id( 'category', $r->id ); } else { $main_term_id = false; } // Si no hi ha categoria principal, obtenim la primera categoria disponible if ( empty($main_term_id) ) { $terms = get_the_terms( $r->id, 'category' ); if ( !empty($terms) && !is_wp_error($terms) ) { // Prenem la primera categoria disponible $term = reset($terms); } else { continue; } } else { // Si hi ha categoria principal, la utilitzem $term = get_term( $main_term_id ); if ( empty($term) ) { continue; } } // Afegeix la categoria als resultats $r->content = '<div class="result-cat-container"><span class="result-cat">'.$term->name.'</span></div>' . $r->content; } return $results; }, 10, 4 );Ernest Marcinko
KeymasterThanks!
The issue was that you had an “All” category, which is basically just an empty category. Instead of that I have enabled the “All” option for the category drop-down: https://i.imgur.com/1ocEzPI.png
It should be okay now. -
AuthorPosts