Viewing 27 posts - 1 through 27 (of 27 total)
  • Author
    Posts
  • #301034

    Hello,

    I am no expert in coding but am curious so I have tried to sort the first part of the issue (moving the search button in the secondary menu) by following the advice in this topic from late 2013 – https://kriesi.at/support/topic/move-search-icon-to-secondary-menu/ – unfortunately I could not find the code bits referred in there in the header .php file :(

    Could you please help? And also let me know if there is a similar way in inserting a widget area created with Enfold in the same menu bar?

    Many many thanks for your help, it would be great to solve this as I have reached the maximum of my abilities here!

    Best!

    #301918

    Hey!

    Try adding this at the very end of your theme functions.php file:

    	add_filter( 'wp_nav_menu_items', 'avia_append_search_nav', 10, 2 );
    	add_filter( 'avf_fallback_menu_items', 'avia_append_search_nav', 10, 2 );
    
    	function avia_append_search_nav ( $items, $args )
    	{	
    		if(avia_get_option('header_searchicon','header_searchicon') != "header_searchicon") return $items;
    	
    	    if ((is_object($args) && $args->theme_location == 'avia2') || (is_string($args) && $args = "fallback_menu"))
    	    {
    	        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;
    	}
    

    Cheers!
    Josue

    #302000

    Hey Josue and thank you very much for looking into this, I have added the code at the end of theme functions.php as you said but it seems to have blocked the entire wp admin interface, something must have gone wrong. Please help!

    Cerasel

    #302051

    Hi,

    Try this method instead, open functions-enfold.php and look for line 63:

    if ((is_object($args) && $args->theme_location == 'avia') || (is_string($args) && $args = "fallback_menu"))
    

    Replace it by this:

    if ((is_object($args) && $args->theme_location == 'avia2') || (is_string($args) && $args = "fallback_menu"))
    

    Regards,
    Josue

    #302078
    This reply has been marked as private.
    #302080

    Hi,

    I can try but i’d need FTP access, can you please create me an temporary FTP account? post it here as a private reply.

    Regards,
    Josue

    #302082
    This reply has been marked as private.
    #302083

    Ok, let me know :)

    #302628
    This reply has been marked as private.
    #302844

    Hi!

    Change this line:

    if ((is_object($args) && $args->theme_location == ‘avia’) || (is_string($args) && $args = “fallback_menu”))
    

    To:

    if ((is_object($args) && $args->theme_location == ‘avia2’) || (is_string($args) && $args = “fallback_menu”))
    

    Best regards,
    Josue

    #302897

    Hi Josue,

    Thank you, the second code worked!

    Could you please send me an equivalent one for the (Enfold custom) widget area?

    Best regards,

    Cerasela

    #302905

    Hey Cerasela!

    You can use the “Search” widget for that.

    Cheers!
    Josue

    #302919
    This reply has been marked as private.
    #303570

    Hey!

    I see the search element in the upper bar. I didn’t understand exactly what you want to achieve, can you post a screenshot/mockup?

    Best regards,
    Josue

    #303700
    This reply has been marked as private.
    #304697

    Hi,

    1. Open /includes/helper-main-menu.php and look for line 68:

    if($phone) 		{ echo "<div class='phone-info {$phone_class}'><span>{$phone}</span></div>"; }
    

    2. Replace it by this:

    if($phone) 		{ echo "<div class='phone-info {$phone_class}'><span>".do_shortcode($phone)."</span></div>"; }
    

    3. Then install this plugin: Widget Shortcode.

    4. Go to Appareance > Widgets and look for the qTranslate specific shortcode:

    5. Finally paste the shortcode here:

    Regards,
    Josue

    #304857
    This reply has been marked as private.
    #305041

    Hey Cerasela!

    I’m seeing the switcher on all pages, try refreshing a few items. I think it needs some CSS adjustments though, add this:

    .phone-info select {
        margin: 0 !important;
    }
    .phone-info .widget_qtranslate {
        padding: 0 !important;
    }

    Best regards,
    Josue

    #305277
    This reply has been marked as private.
    #305331

    Hey Cerasela!

    Sorry for not explaining, add it to Quick CSS (Enfold > General Styling).

    Regards,
    Josue

    #305422

    Thank you very much Josue, it looks good now!

    Best,

    Cerasela

    #305438

    Hi Josue, this trick is interested. How do I set this (if possible) in my child theme?

    #305452

    Hi @czar!

    Try copying the modified /includes/helper-main-menu.php to your child theme folder.

    Best regards,
    Josue

    #305470

    Great Josue, many thanks but another courtesy: which use shortcode or php code to display breadcrumb? thanks

    #305483

    Hi!

    There is no shortcode to display the breadcrumb trail, if you want that you’d need to call the avia_breadcrumbs() function in the helper-main-menu.php file, change this line:

    if($phone) 		{ echo "<div class='phone-info {$phone_class}'><span>{$phone}</span></div>"; }
    

    To:

    echo "<div class='phone-info {$phone_class}'>".avia_breadcrumbs()."</div>";
    

    Best regards,
    Josue

    #305499

    Ok, many tanks Josue

    #305503

    You are welcome, always glad to help :)

    Regards,
    Josue

Viewing 27 posts - 1 through 27 (of 27 total)
  • The topic ‘Insert search button and widget area in the secondary menu bar’ is closed to new replies.