Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #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.

    #1114393

    Hey 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,
    Mike

    #1114909
    This reply has been marked as private.
    #1115171

    Hi,
    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,
    Mike

    #1116131

    Outstanding! 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!

    #1116324

    Hi,
    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

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Place search icon in Secondary Menu’ is closed to new replies.