Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Search Setting Not Visible in the Frontend
- This topic has 3 replies, 2 voices, and was last updated 1 year, 3 months ago by
mosesdinakaran_ol9N.
-
AuthorPosts
-
February 11, 2025 at 2:48 pm #52914
mosesdinakaran_ol9N
ParticipantHi Team, For some reason the search setting is not visible in the frontend can you please help
I have created the below custom attributes
Lyricist
Vedanayagam Sastriar
H.A. Krishna Pillai
Singer
Dr. D.G.S. Dhinakaran
Fr. S.J. Berchmans
Raga
Shankarabharanam
Mohanam
Thala
Adi Thalam (8 beats)
Rupaka Thalam (6 beats)I was expecting Categories and these custom fields visible in the search setting, But its not happening
Can you please supportFebruary 11, 2025 at 3:53 pm #52915Ernest 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.
February 11, 2025 at 4:15 pm #52916Ernest 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.
February 11, 2025 at 4:38 pm #52917mosesdinakaran_ol9N
ParticipantIt does works now Thank you very much for the quick solution. Let me explore more and will get back if I face any challanges.
-
AuthorPosts
- You must be logged in to reply to this topic.