Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Not replacing top search
- This topic has 7 replies, 2 voices, and was last updated 3 years, 2 months ago by
Ernest Marcinko.
-
AuthorPosts
-
May 23, 2020 at 4:55 am #27511
chrisbartellbsa35
ParticipantHello: the plugin is working here https://cpcbsa.org/search/ but it is not replacing the top navigation (default) search. Please advise.
May 23, 2020 at 8:39 am #27517Ernest Marcinko
KeymasterHi,
Thank you very much for the details, it helps a lot.
The search is integrated directly into the site header template, so it is not possible to automatically replace it. Since you shared FTP access, I logged in to check, and found that the header.php file in the theme directory contains the header search bar.
I have made a programatical replacement for you. I strongly suggest creating a child theme, and copying the header.php file there, so future theme updates don’t revert the changes back.I also noticed that the positioning may require some changes to get the replaced container right. For that, I recommend using this custom CSS:
.et_search_outer .asp_m { width: 50% !important; position: absolute; right: 80px; top: 32px; } .asp_r_2 { z-index: 99999 !important; }This will adjust the search position a bit, but further adjusments might be required.
May 23, 2020 at 4:50 pm #27525chrisbartellbsa35
ParticipantThank you so much! This is great!
May 26, 2020 at 7:41 am #27543Ernest Marcinko
KeymasterYou cannot access this content.
August 31, 2020 at 3:42 pm #29205chrisbartellbsa35
ParticipantHello: this is broken again. Can you make the change and tell me the code you placed in the header.php file so I can fix it next time? Thanks!
September 2, 2020 at 9:03 am #29216Ernest Marcinko
KeymasterHi,
Sure, I made the replacement, and this is the changed header.php file.
March 14, 2023 at 9:20 pm #41760chrisbartellbsa35
ParticipantHello! This is not working again. I have replaced the header.php with the file you sent previously. But the Ajax search does not work.
Please advise. Thanks!
March 15, 2023 at 1:30 pm #41781Ernest Marcinko
KeymasterMake sure the correct file was updated, as well as the correct directory – if you are using a child theme, then check the child theme directory as well.
Also check if the file was not updated in a recent theme update, it is possible that the structure is different now. -
AuthorPosts
- The topic ‘Not replacing top search’ is closed to new replies.