You could try putting this code in your functions.php
function remove_contact_nav( $nav_menu, $args ){
if( is_page_template('template-contact.php') || is_page( 'contact' ) ) {
$nav_menu = null;
}
return $nav_menu;
}
add_filter( 'wp_nav_menu', 'remove_contact_nav', 11, 2 );
The if condition need to be modified as per your template name or the second condition would also do if your contact page slug is contact
Related Posts:
- wp_enqueue_script adding conditional statement not working
- Check if first paragraph is an image, then show custom code right after it?
- If post author role is X
- Can a conditional statement apply to part of a slug?
- Add default content to posts in a specific category?
- is_front_page, is_page(‘slug’), is_page(id) not working
- Need help on creating If-statement for custom meta fields
- How to make gravatar.com avatars conditional?
- Loading Scripts on Specific Pages
- Condition function for is parent category?
- Proper syntax for simple conditional bloginfo language
- wordpress is_page() problem
- Location-Based Content
- Personalized message for each unique password-protected page
- Conditional Shortcode image display
- Change Woocommerce order button page on particular page
- Change a url / link if a user is logged in?
- to create own conditional tags for business directory in wp
- How to use “Cases” instead of “IFs” for conditional logic
- Which is the better way to write a conditional statement? [closed]
- Nested conditionals
- Is there a way to password-protect part of a post?
- if/Else have_posts Else fails to echo message to page
- Conditonal statement for iPad
- Return function only on certain pages
- How to write this conditional statement?
- Conditional for Custom Post Types
- Date-Based Conditional Tag
- Message box when accessed from iPad
- Show this code if user has previously left a comment
- Insert a conditional in the middle of a function to give it 2 different outcomes
- How can I use ‘edit_form_after_title’ conditionally?
- Force Log in to view a page
- Conditional loading of CSS for my plugin
- Looks like this if condition is not working [closed]
- Generating images from an array of categories
- WP conditional site logo and header block
- How to know if the most recent article
- Widget logic conditional widget
- How to display image on condition that a selection has been made
- How to Conditionally Not Display a Link Based on Current URL?
- Allow users to only CREATE one single (custom) post
- If statement to check for post_content
- why is my custom loop failing?
- Conditional sidebar menu
- What is the best way to disable my WP website if the user has adblocker on? [closed]
- Why isn’t is_page working when I put it in the functions.php file?
- How do I add nested categories to drop-down menu in twenty-eleven?
- Show content after the first and second paragraph
- How to display the_post_thumbnail if a post has one or otherwise display the first image in a post?
- Display only certain posts based on visitor’s country?
- How to tell if the user is an admin?
- Function like in_category for custom taxonomies
- Conditions for Users and Visitors
- Make “sidebar template” the default template for new pages
- What is the WordPress Pinecone sitting on top of? [closed]
- Custom Menus, Widgets & Conditional Statements
- How to show my sidebar in specific page only?
- Conditionally load child themes
- Display Footer Shortcode Different for Logged In Users
- Add an option to a Child theme of Twenty Eleven
- One custom loop with condition to check child posts
- Conditional based on number of specific custom taxonomy terms in archive.php
- Conditional for a Single Post That Belongs to a Category?
- Dynamically output a class to an anchor tag depending on what tag is chosen
- Conditional does not work with add_filter
- Dynamic Sidebar Conditional [duplicate]
- Why might conditionals not work on a page?
- Add class to DIV depending on page loaded
- Blog post not showing title
- Using PHP Increment and Conditional Statement to Alternate Loop Background
- Extending Twenty Eleven Theme
- No three-columns template in TwentyEleven?
- Conditional statement not working in function
- How to hide a menu from public, but share content with a private link [closed]
- Can I set up a hover animation in CSS depending on a PHP conditional?
- do_action in conditional
- the_content not working
- Parse a shortcode differently based on on what it’s nested in
- Help with this custom field conditional if no field is set display nothing
- exclude custom post type from running a function
- Twenty Eleven theme header images manual next previous buttons
- Can I decide what categories show on my posts page?
- featured images twenty eleven theme
- Twenty Eleven: Home Page, View full post of most recent post & Summary of the rest
- Chat window hiding behind Twenty Eleven header
- wp_enqueue_script JS code runs too late (after user begins interacting)
- Contact Form 7: conditional logic in e-mail
- Conditional formatting on data fetched from MYSQL
- Find and print first entry from WordPress post in custom excerpt?
- How can I check the rewrite slug of current post type listing page
- Dynamic Content w/ geolocation in WP?
- Conditional redirect on login using referring URL
- Loading scripts only if a particular shortcode or widget is present
- Conditional required fields for WordPress Contact Form 7
- Issue in If else condition [closed]
- Help with if else statement for separating content from image attachment
- First argument is expected to be a valid callback for cp_admin_init and _canonical_charset
- Subpage Conditional
- How to separate a specific page’s comments from other comments