Digital experiences for all disciplines
New Landing › How can we help? › Themeforest Theme Support › Dante › Naked Header, want to show icons for social media after Menu items
New Landing › How can we help? › Themeforest Theme Support › Dante › Naked Header, want to show icons for social media after Menu items
Tagged: social icons in menu
- This topic has 26 replies, 4 voices, and was last updated 8 years by Mohammad – SUPPORT.
-
Posted in: Dante
-
March 10, 2016 at 1:50 pm #254714
Hi,
Please paste this code at functions.php of child theme.`function sf_main_menu($id, $layout = “”) {
// VARIABLES
global $post;
$options = get_option(‘sf_dante_options’);
$show_cart = $options[‘show_cart’];
$show_wishlist = $options[‘show_wishlist’];
$header_search_type = “search-1”;
$disable_megamenu = false;
if (isset($options[‘header_search_type’])) {
$header_search_type = $options[‘header_search_type’];
}
if (isset($options[‘disable_megamenu’])) {
$disable_megamenu = $options[‘disable_megamenu’];
}
$page_menu = $menu_output = $menu_full_output = $menu_with_search_output = “”;
if ($post) {
$page_menu = sf_get_post_meta($post->ID, ‘sf_page_menu’, true);
}
$main_menu_args = array(
‘echo’ => false,
‘theme_location’ => ‘main_navigation’,
‘walker’ => new sf_mega_menu_walker,
‘fallback_cb’ => ”,
‘menu’ => $page_menu
);// MENU OUTPUT
if ($disable_megamenu) {
$menu_output .= ‘<nav id=”‘.$id.'” class=”std-menu clearfix”>’. “\n”;
} else {
$menu_output .= ‘<nav id=”‘.$id.'” class=”mega-menu clearfix”>’. “\n”;
}if(function_exists(‘wp_nav_menu’)) {
if (has_nav_menu(‘main_navigation’)) {
$menu_output .= wp_nav_menu( $main_menu_args );
}
else {
$menu_output .= ‘<div class=”no-menu”>’.__(“Please assign a menu to the Main Menu in Appearance > Menus”, “swiftframework”).'</div>’;
}
}
$menu_output .= ‘</nav>’.do_shortcode(‘[social size=”standard” type=”twitter,vimeo,facebook”]’).”\n”;// FULL WIDTH MENU OUTPUT
if ($layout == “full”) {$menu_full_output .= ‘<div class=”container”>’. “\n”;
$menu_full_output .= ‘<div class=”row”>’. “\n”;
$menu_full_output .= ‘<div class=”menu-left”>’. “\n”;
$menu_full_output .= $menu_output . “\n”;
$menu_full_output .= ‘</div>’. “\n”;
$menu_full_output .= ‘<div class=”header-right”>’. “\n”;
$menu_full_output .= ‘<nav class=”std-menu”>’. “\n”;
$menu_full_output .= ‘<ul class=”menu”>’. “\n”;
if ($header_search_type == “search-1″) {
$menu_full_output .= ‘<li class=”menu-search parent”><a href=”#” class=”header-search-link”><i class=”ss-search”></i></a></li>’. “\n”;
} else if ($header_search_type == “search-2″) {
$menu_full_output .= ‘<li class=”menu-search parent”><a href=”#” class=”header-search-link-alt”><i class=”ss-search”></i></a>’. “\n”;
$menu_full_output .= ‘<div class=”ajax-search-wrap”><div class=”ajax-loading”></div><form method=”get” class=”ajax-search-form” action=”‘.home_url().’/”><input type=”text” placeholder=”‘.__(“Search”, “swiftframework”).'” name=”s” autocomplete=”off” /></form><div class=”ajax-search-results”></div></div>’. “\n”;
$menu_full_output .= ‘</li>’. “\n”;
}
if ($show_cart) {
$menu_full_output .= sf_get_cart();
}
if ( class_exists( ‘YITH_WCWL_UI’ ) && $show_wishlist) {
$menu_full_output .= sf_get_wishlist();
}
$menu_full_output .= ‘</ul>’. “\n”;
$menu_full_output .= ‘</nav>’. “\n”;
$menu_full_output .= ‘</div>’. “\n”;
$menu_full_output .= ‘</div>’. “\n”;
$menu_full_output .= ‘</div>’. “\n”;$menu_output = $menu_full_output;
} else if ($layout == “with-search”) {
$menu_with_search_output .= ‘<nav class=”search-nav std-menu”>’. “\n”;
$menu_with_search_output .= ‘<ul class=”menu”>’. “\n”;
if ($header_search_type == “search-1″) {
$menu_with_search_output .= ‘<li class=”menu-search parent”><a href=”#” class=”header-search-link”><i class=”ss-search”></i></a></li>’. “\n”;
} else if ($header_search_type == “search-2″) {
$menu_with_search_output .= ‘<li class=”menu-search parent”><a href=”#” class=”header-search-link-alt”><i class=”ss-search”></i></a>’. “\n”;
$menu_with_search_output .= ‘<div class=”ajax-search-wrap”><div class=”ajax-loading”></div><form method=”get” class=”ajax-search-form” action=”‘.home_url().’/”><input type=”text” placeholder=”‘.__(“Search”, “swiftframework”).'” name=”s” autocomplete=”off” /></form><div class=”ajax-search-results”></div></div>’. “\n”;
$menu_with_search_output .= ‘</li>’. “\n”;
}
$menu_with_search_output .= ‘</ul>’. “\n”;
$menu_with_search_output .= ‘</nav>’. “\n”;
$menu_with_search_output .= $menu_output . “\n”;$menu_output = $menu_with_search_output;
}
// MENU RETURN
return $menu_output;
}`
Thanks
MohammadMarch 10, 2016 at 8:05 pm #254811This reply has been marked as private.March 10, 2016 at 8:17 pm #254813This reply has been marked as private.March 10, 2016 at 8:43 pm #254822This reply has been marked as private.March 11, 2016 at 8:31 am #254862Hi,
Please remove the code from functions.php of child theme as i gave you. You can activate the child theme and everything should work perfect.
Thanks
MohammadMarch 11, 2016 at 2:54 pm #254934This reply has been marked as private.March 11, 2016 at 4:58 pm #254956This reply has been marked as private.March 11, 2016 at 5:45 pm #254962Hi,
Please check the permalinks now.
Thanks
MohammadMarch 11, 2016 at 6:04 pm #254967This reply has been marked as private.March 11, 2016 at 6:10 pm #254969Hi,
This plugin Private Posts Page was cause to issue, i disabled it to resolve the issue so please check it now.
Thanks
MohammadMarch 11, 2016 at 9:19 pm #254982This reply has been marked as private.March 14, 2016 at 10:08 am #255127Hi,
Please use this plugin https://wordpress.org/plugins/wordpress-seo/. It will add options to hide at search engines below page content editor.
Thanks
Mohammad -
Posted in: Dante
You must be logged in and have valid license to reply to this topic.