Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › First item in search results displaying twice
This topic contains 10 replies, has 2 voices, and was last updated by mckots87 1 year, 9 months ago.
- AuthorPosts
- May 24, 2022 at 9:54 pm #37846
Hi, for our Attorney Directory (Attorneys post type) on our site, for some reason the first entry of any search query whatsoever is displaying twice. (see screenshot)
– We are using Elementor Pro and a Loop Template made with Ele Custom Skin
– Not happening with other Post Type “News”Attorney Directory URL: https://chicagocommittee.org/attorney-listings/
I’ve reviewed all the settings and I cannot figure out why this is happening, any help here is really appreciated and thank you!
Mike Kotler
Attachments:
You must be logged in to view attached files.May 25, 2022 at 9:52 am #37849Hi,
The issue here is probably the custom loop with the elementor skin. We can not officially support 3rd party elementor plugins, as those can directly conflict with the search results loop, and create issues like this.
If you want, you can add temporary FTP access, I can try to debug the the override code, to see if there is anything to do, but I can not promise anything.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
May 25, 2022 at 11:54 am #37852You cannot access this content.May 25, 2022 at 3:58 pm #37859Hi Mike,
Thank you for the details!
I tried to debug this for over an hour, but I could not find any issues within the search side. The query variables are properly set, even the results in the query are correctly passed and set, there are no duplicates in the final results.
Somewhere along the ECS the duplication happens – try checking the settings there, something along custom query arguments or similar, those should affect the final outcome.I tried to inspect their source code, but I am not familiar with those internal workings, so I could not figure out where the issue might be.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
May 25, 2022 at 4:09 pm #37860Thank you for your help. So do you think it is a ECS issue, not Elementor? I appreciate it because if I cannot figure it out in settings I’m going to contact their support.
Mike
May 26, 2022 at 10:25 am #37864That is much more likely, pure Elementor is working fine on our ends.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
July 17, 2022 at 4:45 pm #38451You cannot access this content.July 18, 2022 at 6:34 am #38457That’s a bummer.
Anyways, I figured out a very simple hacky solution. I don’t know how effective this is going to be, or how long is usable though. Basically a small custom code, which triggers whenever ajax search pro finishes with the results. When it triggers, it fetches the items, and hides the very first one – and that’s it.
add_action('wp_footer', 'asp_custom_footer_script', 99999); function asp_custom_footer_script() { ?> <script> (function($){ $('.asp_m_1').on('asp_elementor_results', function(){ $($('.asp_es_1 .elementor-post').get(0)).css('display', 'none'); }); }(WPD.dom)); </script> <?php }
Try adding this code 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.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
July 18, 2022 at 1:26 pm #38459Ernest, as far as I can tell this works perfectly! I cannot thank you enough for this! You are the man, thank you, thank you, thank you!
Hopefully it lasts forever hahah. I really appreciate it again!!!
Mike
July 18, 2022 at 1:58 pm #38460You cannot access this content. Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
July 18, 2022 at 2:00 pm #38461Of course. Thank you again!
- AuthorPosts
The topic ‘First item in search results displaying twice’ is closed to new replies.