WordPress.org

Forums

Add new custom menus to Eos in WordPress 3.0 (1 post)

  1. Charles E. Frees-Melvin
    Member
    Posted 5 years ago #

    This code replaces the top menu with a menu called HeaderMenu in 3.0's custom menus.

    <div class="HeaderMenu" id="HeaderMenu">
    
    <?php if(function_exists('wp_nav_menu')): ?>
    
    <?php wp_nav_menu( array( 'menu' => 'HeaderMenu', 'sort_column' => 'menu_order', 'container' => 'none' ) ); ?>
    
    <?php else : ?>
    	  <ul>
    
    	  	<?php
    			if ($aOptions['topmenu_dropdown'])
    				wp_list_categories('orderby='.$aOptions['topmenu_sort_by'].'&order='.$aOptions['topmenu_sort_order'].'&title_li=&depth=3');
    			else
    				wp_list_categories('orderby='.$aOptions['topmenu_sort_by'].'&order='.$aOptions['topmenu_sort_order'].'&title_li=&depth=1');
    			?>
    
    		</ul>
    
    <?php endif; ?>
    
    		<span class="clear"></span>
    	</div>

    This code replaces the bottom menu with a menu called HeaderSubMenu in 3.0's custom menus.

    <div class="HeaderSubMenu" id="HeaderSubMenu">
    
    <?php if(function_exists('wp_nav_menu')): ?>
    
    <?php wp_nav_menu( array( 'menu' => 'HeaderSubMenu', 'sort_column' => 'menu_order', 'container' => 'none' ) ); ?>
    
    <?php else : ?>
    
    		<ul>
    			<li><a href="<?php bloginfo('url'); ?>"><?php _e('Home','Eos'); ?></a></li>
    			<?php
    			if ($aOptions['pagemenu_dropdown'])
    				wp_list_pages('orderby=menu_order&title_li=&depth=3');
    			else
    				wp_list_pages('orderby=menu_order&title_li=&depth=1');
    			?>
    		</ul>
    
    <?php endif; ?>
    
    		<span class="clear"></span>
    	</div>

Topic Closed

This topic has been closed to new replies.

About this Topic

  • RSS feed for this topic
  • Started 5 years ago by Charles E. Frees-Melvin
  • This topic is not a support question
  • WordPress version: 3.01

Tags