• Hi,

    I would like to replace the default main nav bar on my website with one created using this plugin. My website is built on the “Foxy” theme by Elegant Themes. I contacted Elegant Theme’s tech support for assistance on how to do this and here’s what I was told:

    Replace this text in the header.php file

    <?php
    	$menuClass = 'nav';
    	if ( 'on' == et_get_option( 'foxy_disable_toptier' ) ) $menuClass .= ' et_disable_top_tier';
    	$primaryNav = '';
    	if ( function_exists( 'wp_nav_menu' ) ) {
    	$primaryNav = wp_nav_menu( array( 'theme_location' => 'primary-menu', 'container' => '', 'fallback_cb' => '', 'menu_class' => $menuClass, 'echo' => false ) );
    	}
    	if ( '' == $primaryNav ) { ?>
    	<ul class="<?php echo esc_attr( $menuClass ); ?>">
    	<?php if ( 'on' == et_get_option( 'foxy_home_link' ) ) { ?>
    	<li <?php if ( is_home() ) echo( 'class="current_page_item"' ); ?>><a>"><?php esc_html_e( 'Home','Foxy' ); ?></a>
    	<?php }; ?>
    
    	<?php show_page_menu( $menuClass, false, false ); ?>
    	<?php show_categories_menu( $menuClass, false ); ?>
    
    	<?php }
    	else echo( $primaryNav );
    	?>

    with

    <?php the_widget('Widget_Class_Name'); ?>

    My question to you is, what widget class name do I need to use for the above code to function properly?

    Thanks so much!

    [Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]

    https://wordpress.org/plugins/jquery-mega-menu/

  • The topic ‘What widget class name should I use in header.php?’ is closed to new replies.