WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I made a custom design for my site. On my header i put my navigation so everytime i call the header the navigation will be called to, so that i would not be calling it all the time.
But now i have a problem, on my 404 PAGE , i don't want to include the navigation, but if i don't include the header the themes won't play. SO how can i do this?. Any ideas is greatly and highly appreciated.

share|improve this question
up vote 6 down vote accepted

Put <?php if( !is_404() ) : ?> before your navigation and <?php endif; ?> after your navigation and VIOLA! It's gone!

share|improve this answer
Yeah, And that was Awsomely greatly and highly APPRECIATED. – tomexsans Feb 17 '12 at 14:53
Even shorter: ! is_404() and wp_nav_menu(); – toscho Feb 17 '12 at 15:06
Is there somewhere to find a list of all the pages that function will work with? I replaced "404" with "home", and it worked. But what else will it work with? – Joel Glovier Aug 22 '12 at 18:06
@jag2007 codex.wordpress.org/Conditional_Tags when in doubt, codex. – mor7ifer Aug 23 '12 at 20:02

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.