Ajax Search with Elementor Pro results displaying twice

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Ajax Search with Elementor Pro results displaying twice

This topic contains 5 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 7 months, 2 weeks ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #44713
    jon A
    jon A
    Participant

    Hi There,

    Looks like i’m having an issue with search results displaying twice after the user has conducted a search query.

    To reproduce the error – go to this link: https://validstage.wpengine.com/validation-reports-archive/

    Type in “Isaac Health” and then you will see two of them pop up.

    If you could please take a look and let me know if by chance I am doing something wrong. Or please let me know if you need more info.

    Other notes:

    WP version v6.2.2
    Advanced Custom Fields Pro Version 6.1.7
    Custom Post Type UI Version 1.13.7
    Ele Custom Skin Version 3.1.7
    Elementor v3.14.1
    Elementor Pro v3.14.1

    Best,

    Jon A

    #44717
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi Jon,

    Thank you very much for the details!

    This same exact issue was once reported, I have found the topic, it’s here. Turns out this is an issue with ECS and WordPress 6.x versions. Unfortunately they still not addressed the problem.

    Please try the snippet from this reply. While this does not resolve the original problem with ECS, but should mask the duplicates if all goes well.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #44719
    jon A
    jon A
    Participant
    You cannot access this content.
    #44720
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Sure! Can you try maybe this variation:

    add_action('wp_footer', 'asp_custom_footer_script', 99999);
    function asp_custom_footer_script() {
    	?>
    	<script>
    	window.addEventListener("load", (event) => {
    		(function($){
    			$('.asp_m').on('asp_elementor_results', function(){
    				let id = $(this).data('id');
    				let seen = [];
    				$('.asp_es_' + id + ' .elementor-post').each(function(){
    					if ( seen.includes(this.className) ) {
    						$(this).remove();
    					} else {
    						seen.push(this.className);
    					}
    				});
    			});
    		}(WPD.dom));
    	});
    	</script>
    	<?php
    }
    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #44721
    jon A
    jon A
    Participant
    You cannot access this content.
    #44722
    Ernest Marcinko
    Ernest Marcinko
    Keymaster
    You cannot access this content. Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.