-
AuthorPosts
-
November 10, 2014 at 4:14 pm #348831
Hello!
How can I put search button/widget in main navigation menu (I’m using enfold photography demo)?November 10, 2014 at 8:11 pm #348992Hey artspbseo!
Try adding this to your custom CSS.
#top #searchform > div { margin-bottom: 30px; min-width: 220px; left: 40px; } #top #searchform { display: inline-block; position: relative; }
And then find line 140 in /enfold/includes/helper-main-menu.php.
echo '</nav>';
And add this beneath it.
echo get_search_form();
Cheers!
ElliottNovember 12, 2014 at 10:13 am #349950Done it – but it’s not working properly in Chrome, somehow better in Firefox and Explorer, and there are troubles with Opera when width is lesser than approx. 967px.
There are screenshots – Chrome, Firefox, Opera.
Currently I have addeed “display:none” attribute for “#top #searchform” in custom.css
Help, please.November 12, 2014 at 8:57 pm #350322Hey!
We can’t see the screenshot because access is forbidden. Please try to use imgur, dropbox, clipular etc. Also, add a screenshot on where you want the search form to go.
Regards,
IsmaelNovember 23, 2014 at 12:22 pm #356183November 24, 2014 at 6:47 am #356530Hey!
I think it’s better if you use the search toggle instead of the actual search form. Please remove the customization we suggested above then use this on functions.php:
add_filter( 'wp_nav_menu_items', 'avia_append_search_side_nav', 10, 2 ); function avia_append_search_side_nav( $items, $args ) { if (is_object($args) && $args->theme_location == 'avia') { global $avia_config; ob_start(); get_search_form(); $form = htmlspecialchars(ob_get_clean()) ; $items .= '<li id="menu-item-search" class="noMobile menu-item menu-item-search-dropdown"> <a href="?s=" rel="nofollow" data-avia-search-tooltip="'.$form.'" '.av_icon_string('search').'><span class="avia_hidden_link_text">'.__('Search','avia_framework').'</span></a> </li>'; } return $items; }
Add this on Quick CSS or custom.css:
li#menu-item-search { position: absolute; right: 0; } .avia-search-tooltip.avia-tt { margin-left: 50px !important; }
Regards,
IsmaelNovember 28, 2014 at 6:00 pm #359694That’s better – BUT – there is a problem with Chrome.
I think, it must be placed after language swithcer, at the top-left corner. Can you do that?November 29, 2014 at 7:48 pm #360125Hi!
Remember to clear your caching/minification after modifying the Quick CSS.
Cheers!
JosueDecember 3, 2014 at 1:39 pm #362081Done it – bout in Chrome and Opera it’s displaying not correct – see screenshot.
Can you help me?December 3, 2014 at 4:16 pm #362167Hi!
Please add following code to Quick CSS in Enfold theme options under General Styling tab
#top #menu-item-search { width: 76%; } .html_header_sidebar .av-sidebar-social-container { top: 20px; }
Cheers!
YigitDecember 5, 2014 at 11:59 am #363511Fixed. Thank you!
-
AuthorPosts
- The topic ‘Search’ is closed to new replies.