Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1125749

    Thanks in advance, Enfold team!

    I am using Zen logic for a small site with 2 languages. That plugin is working, and the client provided Español and English pages for me. So, content is in correct language and so is menu. I can deal with the footer by using a color section and adding widgets at the bottom of the page.

    Two issues remain:

    1. Can I use different “Extra Elements” content at the top of the Español navigation menu?
    2. Can I add a search icon to the right of the Español navigation menu?
    #1125750

    Follow up; needed to provide you with more information so that my initial request makes sense.

    #1126010

    I figured out the “Extra Elements” issue. I made use of the Custom Fields available in WordPress, and simply needed to figure out the correct field to change. After searching through the PHP documents of the parent Enfold theme, I determined that the top bar was echoing the value of the “phone” field.

    My solution: on pages where the language is Español, I added a custom field with name “phone” and pasted the needed text as the value for that field on every page where the translation needed to occur.

    So, that only leaves item #2: how do I add a search icon to the right side of the Español menu?

    • This reply was modified 5 years, 4 months ago by rlhinirv57. Reason: needed to emphasize the one issue remaining, appending the search element
    #1126555

    Hi,
    Sorry for the late reply, I took a look at your page but it looks like your search icon has been disabled at Enfold Theme Options > Main Menu > Append search icon to main menu please check and enable.
    Once it is enabled we can move it to the end of your menu next to the word “English” that is where you would like it?

    Best regards,
    Mike

    #1126575

    Hello Mike,

    That search icon is now activated to be appended to the menu. It only shows up on the English menu, but not the Español menu. Yes, placing it as the last item to the right is perfect.
    Credentials noted below in private reply area. If you can provide me with a short explanation of how you append the search icon to either menu, that would be great. More and more clients are asking for bilingual sites so I will run into this issue again.

    Thanks much!
    Rhonda

    • This reply was modified 5 years, 4 months ago by rlhinirv57.
    #1126639

    Hi,
    Thanks for the login, I added this function to your child theme functions.php:

    if(!function_exists('avia_append_search_nav'))
    {
    	//first append search item to main menu
    	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(avia_get_option('header_position',  'header_top') != "header_top") return $items;
    	
    	        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;
    	}
    }

    This will add the search icon ajax search to zen menu logic plugin by overriding the parent avia_append_search_nav function and it will make sure to append the search icon to all menus regardless of location. You should be able to use this in all of your installs.
    Please check.

    Best regards,
    Mike

    #1126674

    Hello Mike,
    First of all, thank you for the fantastic support provided! Works perfectly well. One of the things I appreciate about licensing the Enfold theme is the prompt and expert support the team provides. That’s a reason I keep buying licenses for new projects. :) I’ll make note of that previous thread solving this same issue that I failed to discover earlier.

    One note: I did want to hide the search icon in the list of pages shown in the footer. To do that, I used the following css pasted into the Quick CSS form in the theme styling admin. Adding this info in case it is useful to someone else:
    #footer li#menu-item-search.noMobile.menu-item.menu-item-search-dropdown::before {display:none;}

    #1126678

    Hi,
    Thank you for the great feedback and for sharing your css for future users, that is one of the reasons I included the function here because that thread was so deep it was hard to find :)
    Anyways thanks again for your patience, shall we close this then?

    Best regards,
    Mike

    #1126679

    Yes, I think we can close this item.

    Again, Mike thank you for the great support!

    #1126680

    Hi,
    Glad we were able to help, we will close this now. Thank you for using Enfold.

    For your information, you can take a look at Enfold documentation here
    For any other questions or issues, feel free to start new threads in the Enfold forum and we will gladly try to help you :)

    Best regards,
    Mike

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘Can I use different "Extra Elements" content with different menus?’ is closed to new replies.