If you need this menu on one page only, let’s say About Us (slug: about-us
), you can easily add a conditional like this in pages.php
at the place where you want the menu to appear:
if (is_page('about-us')) {
wp_nav_menu(
array(
'theme_location' => 'secondary-menu',
'menu_class' => 'secondary', 'fallback_cb' => ''
));
}
Remember that if you have a third party theme, you should build a child theme for this page, because else your adaptation will be lost when the theme is updated.
Related Posts:
- Check if a menu is empty?
- How to call a certain object/menubar in a PHP file
- start_lvl Ignored in Custom walker_nav_menu
- Menu Items Disappearing
- wp_delete_auto_drafts() deletes links in menus
- What exactly does “Posts page” do in WordPress?
- WordPress Template Engine?
- How to have a custom display for both woocommerce archive and product-category pages? [closed]
- Walker class: Problems with understanding how walk() method can be called without error
- How to Use the Function is_user_logged_in To Display Different Menus?
- Replacing a specific menu item
- Blank on static home page?
- How can I access the “description” of a menu item?
- WordPress theme & site not loading after moving files
- Adjust the results quantity for Search Results page pagination
- Custom Post Type .current-menu-item not applying on Custom Post Type Archive Page
- Is it possible to use the featured image of a page as a css background without inlining?
- How can I add a custom class to only nav sub-menu > li > a items in WordPress?
- items_wrap not working
- How to override wp-admin styling
- Style wp_page_menu() items
- Have CSS Class Added with `is_page()` WP function
- An unwanted inline style is added to my body tag
- Run a filter when a walker runs
- Input type search in Menu
- WP Walker using custom css classes
- Change list item content in menu navigation to add a child element with specific class
- Get and insert order email address to the PHP template inside HTML text
- Child page menu in sidebar
- Trying to store submenu items to render out after main menu
- How to change menu order item
- Can’t print Yoast meta description into page template (syntax error, unexpected ‘.’) [closed]
- Use WordPress function in php file
- Two menus show up
- Add filter multiple times using only one master function
- Register a menu – Error Header
- Parsing Menu Items and Blog Posts
- Function Reference Documenting Template Tags for use in Custom Theme Templates?
- Removing WordPress Footer -without access to PHP code?
- Create page template via functions.php?
- What’s a good way to allow overwriting files within a child theme if I want the same folder structure?
- Add value to new attribute inside WordPress menu items
- how to display this functions?
- is_page_template showing partial results
- Adding regular php file to site
- Post repeated when opening in overlay, how do I solve this? [closed]
- Menu Items fail to save correctly, cause reset of related page metadata
- Dropdown menu for categories
- How to display different submenus?
- Get the name of menu item with wp_nav_menu
- Output only links using wp_nav_menu()
- How to add aria role and schema markup to custom walker container
- Extend Menu Walker Output
- how to add a div inside wp_page_menu
- How to correctly load a different version of main menu based on the user language in WordPress? Is it a good solution?
- Why can’t I add a custom image in my navigation?
- pass html code to worpdress
- Remove submenu item from list
- conditional: if is page, and all subpages
- Remove the Tag from wp_nav_menu
- Dynamic menu with custom post types
- Getting a WordPress tag to print inside of a traditional php echo
- Adding an Anchor Link to a wordpress menu using WPBakery Page Builder
- Prevent header and footer from loading on specific pages with template or plugin
- How to make only the valid active page of a multilevel menu active with – “.nav li.current-menu-item a”?
- Display metabox galleries on specific page template in admin editor
- Display WordPress archive template page in 3 columns and not 1 column [closed]
- Run do_shortcode on php template using JS function
- Replace jQuery with PHP or CSS for Customized WordPress wp_nav_menu
- How to hardcode header and footer in WP?
- How to put 2 php codes in functions.php without site crashing
- wp_get_nav_menu_items() with ACF
- How to switch between two primary menus (programatically0
- Redirect User when they click Menu Option
- Used a code to revoke some dashboard menus for my contributors but for some reason it’s revoked me access to the editor [closed]
- How to give custom roles the capability to edit one Menu instead of every Menu
- Primary navigation menu with timed items from custom post type
- If is_page elseif is_page not working like I want it to
- Difference between “Walker_Nav_menu” and “walker”
- missing admin bar and widget in a template
- How to include a function in a template with template tag
- Fatal error when using array_diff() function inside of wp_update_nav_menu hook?
- My own theme’s custom widget areas are not working
- Vertical Menu for one page only
- How limit the width of a fixed menu-bar on scroll?
- Pulling a variable into the wp_nav_menu function
- Beyond widget side menu editing, with the php page, custom template
- Two theme locations for two menus, but only one is showing up
- wp nav menu without label
- Contact form field in wordpress menu
- Remove all nav menu classes except those which begin with certain letters
- How to add a code for lastpostdate after/inside a specific menu link?
- Add the “.current-menu-item” class to tag?
- why is markup routinely placed in functions in wordpress?
- WordPress adding in site URL to header links
- How to change the menu color
- Can’t remove menu items added by plugin
- Nav Menu Display
- Adding a unique class to wp_nav_menu
- Custom nav with bootstrap dropdown