Use a conditional tag:
Codex References:
Function Reference (Conditional Tags)
You can specify the landing page by Page ID, Page Title or Page Slug.
Here is an example:
<?php if ( !is_page( 'landing-page' ) ) {
wp_nav_menu( array(
'show_home' => 'Home',
'container' => 'false',
'theme_location' => 'main')
);
}
endif;
?>
It excludes the page (in this case the page with the slug “landing-page”) by placing the !
in front of is_page
No need for javascript, this should do the trick.
Related Posts:
- How to get IDs for objects in menu branch?
- Check if a menu is empty?
- Dynamically link to the latest post or simulate request of specific post in page template
- Show only 2nd level of navigation depending on active navigation
- Show all parent pages and their children below from same author as currently viewed page
- How to retrieve depth of menu into template
- Output menu navigation in php file
- How do I render a navigation menu like my theme does?
- How to make the Primary Menu stay the same in the PC and mobile versions of the Twenty Sixteen theme
- Change submenu markup
- How to modify wp-includes without messing my wordpress installation?
- pull non-wp site into content area of wordpress -or- pull wp header into non wp site?
- WordPress template – How to add class to li tag if submenu exist
- How can I switch pages?
- How can template identify what page it’s being used on?
- Prevent menu from loading in a page template [duplicate]
- Add a submenu to wp_nav_menu
- Automatically going to the first page in a hierarchy?
- How to add search to menu?
- Wp_list_pages not showing children with custom page template
- Is it all right to put the whole tag into template_part file?
- Swap out a page that is a parent to a many many pages
- Create link/button to create new post using specific template
- Add a non-dynamic phrase/character after a page title?
- How to add class and span to
- Programatically retreive page content from its template page
- Custom Menu based off custom header
- wp_nav_menu doesn’t show on index page
- Setting up menus before making a template live
- How does WP knows which template to use for a page
- When submitting more than 200 menus, I get “Service Temporarily Unavailable”
- Theme: Twenty Thirteen Mobile Sliding Menu Doesn’t Bump Content Down
- Next/previous a-like single navigation
- How to get current menu item “CSS Classes” value?
- nav_menu: how to force a subpage switching on the parent menu
- wp_list_pages, links only for pages with no children
- wp_dropdown_nav function to list menu items
- Menus not showing in the admin menu, after save
- How to change page location in WordPress
- Customize Walker_nav_menu to show posts if item is category
- Hardcoding links to wp_nav_menu
- wp_nav_menu() reutrns HTTPS?
- Use menu structure for permalinks
- Is there a way to share a template/markup with the JSON API so that it doesn’t need to be declared both in PHP and in JS?
- Adding class atribute to wp_nav_menu ul
- Top menu link anchor href value change after online server?
- My WordPress menu based on Twitter bootstrap creates menu-item and not page-item
- Creating and populating custom nav menu (menu-item-position not working)
- custom rearranged menu with excerpt for selected children in sidebar.php
- menu entries are lost
- Add Menu Item in Specific Order
- How do I fix the URL used in the WordPress admin menu for customize.php
- “Static” Child Menu with Accordian
- Problem with multiple menus in theme
- Menu not always using correct link
- Custom Menus and taxonomies
- Menu id in nav menu ignored
- How to install a wordpress website template on an existing website?
- Placing generated list into drop-down on custom menu
- Bootstrap 3 and WordPress menu navigation menu highlighting
- Help with changing style of the extended menu drop down [closed]
- Need direction on a seemingly complex menu walker for automatically inserting a parent link li in it’s submenu ul
- How to output the menue structured for tabbed navigation?
- Replace Menu Item with Logged in username
- Show content of subdomain from specific menu-item?
- Custom Archive with Content for Custom Post Type
- Add more levels to menu
- how bbPress and buddypress add their own page templates to the page template drop down on the page editing screen
- Where these arguments are defined?
- Show only second level menu items? [duplicate]
- Add item ONLY to the primairy navigation
- wp_nav_menu in 3.7 add name class nav navbar-nav
- Adding two submenus to a menu
- How do i keep my current page menu highlighted on pagination?
- Set menu item class into body
- How to create a menu super voice in WP?
- Update nav menu item position programmatically
- Limit the amount of menus someone can make
- Change archive link to single post
- Navigational error
- How to customize navigation menu?
- Remove from wp_nav_menu() wordpress
- Add Protocol to Custom Menus
- Hide page link in main menu from anonymous users
- Additional class for.sub-menu UL?
- Active menu also for single array
- load wp_menu dynamically with enquire.js
- Menu administration, how to allow special charachters
- How to avoid website url appending problem in wp site?
- How to make a page to not appear in the menu when created?
- Create custom page and custom menu
- Get first menu item of custom menu
- How to handle change the appearance of ‘categories’ box on dashboard?
- How do I add a link to the menu that has a charector (?) in it?
- Problem with custom menus
- WP NAV MENU – Dropdown always showing
- Add tooltips with image in WordPress Menu?
- How to make a drop down menu with categories
- How can I modify wp_nav_menu with walker?
- Can’t style custom menu