-
AuthorPosts
-
June 28, 2019 at 10:49 pm #1114368
Hello,
Trying to add the search icon to my Secondary menu (top). Far right of the three current nav items.Added the script that Ismael provided from previous support thread to my functions.php and broke my site. Couldn’t even log into the WP.
add_action('wp_footer', 'ava_custom_script'); function ava_custom_script(){ ?> <script type="text/javascript"> (function($) { $(window).load(function() { $("#menu-item-search").detach().appendTo('#header_meta #avia2-menu'); }); })(jQuery); </script> <?php }
Reversed the edits with FTP. All is in working order now. Would still like to get Search in the top right corner. But, afraid to break the site again. Please assist. Site login info provided below.
June 29, 2019 at 3:48 am #1114393Hey Nicole,
Thank you for the login, but Please include FTP access in the Private Content area so if your site crashes again we can correct.Best regards,
MikeJuly 1, 2019 at 3:59 pm #1114909This reply has been marked as private.July 2, 2019 at 1:48 pm #1115171Hi,
Thank you for the login, I found that in your child theme functions.php you already had the action “ava_custom_script” so when the new script added it again it caused the crash. I renamed the new script to “ava_custom_search” like this:add_action('wp_footer', 'ava_custom_search'); function ava_custom_search(){ ?> <script type="text/javascript"> (function($) { $(window).load(function() { $("#menu-item-search").detach().appendTo('#header_meta #avia2-menu'); }); })(jQuery); </script> <?php }
It now seems to be working correctly, Please clear your browser cache and check.
Best regards,
MikeJuly 6, 2019 at 2:59 am #1116131Outstanding! Perfect. Mike, you’re terrific. I’ve utilized a lot of your other support responses on here. You are clear, concise, and literally fix the problem straightaway. #1 Moderator in my book. Thank you!
July 6, 2019 at 7:48 pm #1116324Hi,
Glad we were able to help, and thanks for the kind words, we will close this now. Thank you for using Enfold.For your information, you can take a look at Enfold documentation here
For any other questions or issues, feel free to start new threads in the Enfold forum and we will gladly try to help you :)Best regards,
Mike -
AuthorPosts
- The topic ‘Place search icon in Secondary Menu’ is closed to new replies.