Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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
add comment

1 Answer

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
1  
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
1  
@jag2007 codex.wordpress.org/Conditional_Tags when in doubt, codex. –  m0r7if3r Aug 23 '12 at 20:02
add comment

Your Answer

 
discard

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.