Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #348831

    Hello!
    How can I put search button/widget in main navigation menu (I’m using enfold photography demo)?

    #348992

    Hey 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!
    Elliott

    #349950

    Done 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.

    #350322

    Hey!

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

    #356183

    I’ve turned on search for now – all I want is to display it responsive, as it displaying now in Chrome, in desktop mode.
    Updated screenshots – Chrome, Firefox, Opera.

    #356530

    Hey!

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

    #359694

    That’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?

    #360125

    Hi!

    Remember to clear your caching/minification after modifying the Quick CSS.

    Cheers!
    Josue

    #362081

    Done it – bout in Chrome and Opera it’s displaying not correct – see screenshot.
    Can you help me?

    #362167

    Hi!

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

    #363511

    Fixed. Thank you!

Viewing 11 posts - 1 through 11 (of 11 total)
  • The topic ‘Search’ is closed to new replies.