SHOW:
|
|
- or go back to the newest paste.
| 1 | <?php //Display menu in your template file | |
| 2 | ||
| 3 | //If this is for WordPress 3.0 and above | |
| 4 | if(function_exists('wp_nav_menu') && has_nav_menu('boys_teams')):
| |
| 5 | ||
| 6 | ||
| 7 | wp_nav_menu( | |
| 8 | array( | |
| 9 | 'theme_location' => 'boys_teams', | |
| 10 | 'container' => 'div', | |
| 11 | 'menu_class' => 'boys-teams-menu-class', | |
| 12 | 'depth' => 2 | |
| 13 | ) | |
| 14 | ); | |
| 15 | ||
| 16 | //If either this is for WP version<3.0 or if a menu isn't assigned, use wp_list_pages() | |
| 17 | else: | |
| 18 | echo '<ul class="boys-teams-menu-class">'; | |
| 19 | wp_list_pages('depth=1&title_li=');
| |
| 20 | echo '</ul>'; | |
| 21 | ||
| 22 | endif; | |
| 23 | ||
| 24 | ?> |