Title: Create non-dropdown sub menu
Last modified: July 19, 2019

---

# Create non-dropdown sub menu

 *  Resolved [vovazuev](https://wordpress.org/support/users/vovazuev/)
 * (@vovazuev)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/create-non-dropdown-sub-menu/)
 * Hi!
 * I have a main menu made of pages. Some of the pages need to have sub menus. I
   mean, when I go to the specific page, there has to appear an additional menu 
   underneath the main menu. Each sub menu item should lead to a separate page (
   thus tabs won’t work). An example of such functionality can be seen here:
 * `http://lostpinesbiblechurch.org/audiofiles.asp`
 * I would really appreciate an advice on how to achieve that menu functionality
   with WP.
 * Thanks!
    -  This topic was modified 6 years, 10 months ago by [vovazuev](https://wordpress.org/support/users/vovazuev/).

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [6 years, 10 months ago](https://wordpress.org/support/topic/create-non-dropdown-sub-menu/#post-11744306)
 * The dropdown is carried out in CSS by your theme or sometimes by a plugin. Which
   theme is this regarding?
 *  Thread Starter [vovazuev](https://wordpress.org/support/users/vovazuev/)
 * (@vovazuev)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/create-non-dropdown-sub-menu/#post-11744575)
 * I’m working with the blank theme. I need a static sub menu, not dropdown.
 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [6 years, 10 months ago](https://wordpress.org/support/topic/create-non-dropdown-sub-menu/#post-11744725)
 * Yeah I get you. That’s not a theme we support though: [https://wordpress.org/themes/blank/](https://wordpress.org/themes/blank/)–
   We only support themes on WordPress.org.
 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/create-non-dropdown-sub-menu/#post-11746326)
 * You can alter the menu produced by WP through the “wp_nav_menu” filter. Your 
   filter callback could add additional menu items, or alter existing ones, or add
   entirely unrelated HTML if you wanted to. There are also several other hooks 
   we can use to customize the output of wp_nav_menu(), up to specifying a custom
   walker for ultimate control. Review the wp_nav_menu() source code for these options.
 * But if you are adding a sub menu that appears under the main menu, you could 
   just have your template output the desired HTML directly without involving wp_nav_menu()
   at all.
 * OR you could add a secondary menu area to your theme where users can specify 
   the sub menu content that will appear in this secondary area.
 * There are many variations on these approaches, what is optimal depends on exactly
   what you wish to accomplish, not just on the page itself, but for any back end
   UI that may be required.
 *  Thread Starter [vovazuev](https://wordpress.org/support/users/vovazuev/)
 * (@vovazuev)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/create-non-dropdown-sub-menu/#post-11748998)
 * Okay, I solved this task by adding a secondary menu to specific pages and then
   forcing the main menu item to be active when I’m on those pages.
 * I used the following function:
 *     ```
       function special_nav_class( $classes, $item ){
       	if(is_page('page-one') || is_page('page-two') || is_page('page-three')) {	
       		if( $item->title == 'Page Title' ){ 
       			$classes[] = "desired-class";
       		}
       		return $classes;
       		} else {
       			return $classes;
       		}
       	}
       add_filter('nav_menu_css_class' , 'special_nav_class' , 10 , 2);
       ```
   

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Create non-dropdown sub menu’ is closed to new replies.

## Tags

 * [menu](https://wordpress.org/support/topic-tag/menu/)
 * [sub-menu](https://wordpress.org/support/topic-tag/sub-menu/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 5 replies
 * 3 participants
 * Last reply from: [vovazuev](https://wordpress.org/support/users/vovazuev/)
 * Last activity: [6 years, 9 months ago](https://wordpress.org/support/topic/create-non-dropdown-sub-menu/#post-11748998)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
