How to display wp_nav_menu() conditionally only when not on a 404 page?

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.

1 Answer
1

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

Leave a Comment