-
AuthorPosts
-
March 5, 2018 at 4:55 pm #921584
I was asked to create a new ticket after reading about the same requirement in this ticket: https://kriesi.at/support/topic/move-search-icon-to-secondary-menu-and-right-besides-the-social-icons/
When I added the code to the child theme’s functions.php it broke the site, so I’m not sure if there’s a newer method to make this work?
I would like to add the search icon/functionality to the secondary menu area to the right of CONTACT.
March 5, 2018 at 9:45 pm #921831Hey lzevon,
Please disable the htaccess login.
Best regards,
BasilisMarch 5, 2018 at 9:47 pm #921833No, I can not do that, but I did provide you with the login to get past it.
March 6, 2018 at 12:25 pm #922197Hi,
We added the script in the functions.php file.
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 }
We also added a few css codes in the style.css file.
#menu-item-search a { line-height: 15px!important; height: 15px!important; } #header_main_alternate li#menu-item-search a { display: none !important; }
Best regards,
IsmaelMarch 6, 2018 at 4:52 pm #922405Thanks Ismael, it appeared in both places (main menu and secondary menu), which we don’t want (just the secondary menu). So for now I disabled the seArch in the theme control panel (Main Menu settings). Also the search icon in the secondary header was lower than all the other items and I want it on the same line. There are lots of style fixes for me to make, but having it only appear in the secondary is where I need to start, please let me know if you have a solution for this?
March 8, 2018 at 6:25 am #923568Hi lzevon,
I don’t see the search anywhere. Can you enable it again please, so that we can help you adjust it?
Best regards,
VictoriaMarch 8, 2018 at 6:26 am #923569I disabled it since it appeared in both menus and it’s a live site (looked terrible). But tomorrow I will put it on a sandbox site and send an update to this ticket.
March 8, 2018 at 10:49 am #923718Hi,
Thanks for creating a sandbox/staging site. Let us know if it’s ready :)
Best regards,
NikkoMarch 9, 2018 at 3:49 am #924236Works a treat on my training site. i’ll dig around for any conflicting styles, etc and get it squared-away. Thank you!
March 9, 2018 at 6:38 am #924273Hi,
Glad to hear that :) Just let us know if you need further assistance.
Best regards,
Nikko -
AuthorPosts
- The topic ‘Add search to secondary menu’ is closed to new replies.