-
AuthorPosts
-
February 1, 2023 at 1:12 pm #1396212
Hello!
I`v set “Append Search Icon To Main Menu”.
But no icon near burger menu. I`ve check page source — there is no search box code. It shows only on full desktop page.
How to put search icon near burger menu?February 1, 2023 at 1:38 pm #1396217Hi,
Sorry for the confusion. Appending a Search Icon is only available for the Top Header layout in Enfold theme options > General Layout tab.
We will add a note about that in the upcoming version.
Cheers!
YigitFebruary 1, 2023 at 5:37 pm #1396255is there no way to put it on top with left sidebar logo layout?
may be copy/paste some code from another layout?February 4, 2023 at 7:13 am #1396632Hi,
Thanks for your patience, try adding this code to the end of your child theme functions.php file in Appearance ▸ Editor:function search_for_mobile_sidebar_header() { ?> <script> window.addEventListener('DOMContentLoaded', function() { (function($){ var width = $(window).width(); var search = $('<li id="menu-item-search" class="mobile-search menu-item menu-item-search-dropdown menu-item-avia-special" role="menuitem"><a aria-label="Search" href="?s=" rel="nofollow" data-avia-search-tooltip="<form role="search" action="https://your-domain.com/" id="searchform" method="get" class=""><div><input type="submit" value="" id="searchsubmit" class="button avia-font-entypo-fontello" /><input type="text" id="s" name="s" value="" /></div></form>" aria-hidden="false" data-av_icon="" data-av_iconfont="entypo-fontello" style=""><span class="avia_hidden_link_text">Search</span></a></li>'); if (width <= 767) { $(search).insertBefore('.main_menu'); } else {} })(jQuery); }); </script> <?php } add_action('wp_footer', 'search_for_mobile_sidebar_header');
Then add this css to your child theme stylesheet or the theme option Quick CSS:
@media only screen and (max-width: 767px) { .responsive #top #wrap_all #menu-item-search.mobile-search { top: 0; height: 80px; right: 50px; display: inline-block; position: absolute; } }
Please ensure to copy the code from the forum and not an email notification so the symbols are not converted.
Please see the screenshot in the Private Content area of the expected results.Best regards,
Mike- This reply was modified 1 year, 9 months ago by Mike. Reason: corrected quotes in code
February 4, 2023 at 10:00 am #1396633Hi there!
Thank you. It must be what I want.I add code (copying from forum, not email) both function and quick css. But something went wrong.
May be it can help to understand what happend:
I keep site with changes for your inspect.
February 4, 2023 at 4:21 pm #1396661Hi,
Please include an admin login in the Private Content area so I can examine.Best regards,
MikeFebruary 4, 2023 at 4:25 pm #1396662Please
February 4, 2023 at 6:02 pm #1396669Hi,
Thanks for the login, the code I post was converted by our site, it needed to use"
instead of"
I corrected your site and will adjust the code above for future readers.
Please clear your browser cache and check.Best regards,
MikeFebruary 4, 2023 at 6:59 pm #1396673it works!
thank you very much!February 4, 2023 at 11:45 pm #1396695Hi,
Glad we were able to help, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.Best regards,
Mike -
AuthorPosts
- The topic ‘Search icon mobile version’ is closed to new replies.