Remove header on specific page
-
Hi!
I use Zunnia and I can’t find a solution to my problem. I would like to remove the header, I mean the nav bar (with the menu items) and the title with the description.I found that I’d probably insert something like
<?php if( !is_page( '1' ) ) : ?>
and
<?php endif; ?>
around the header that I want to disable (I have to replace 1 by the ID of my page, ok). But it seems doesn’t work, the entire page is blanck after that.Here is the header.php text :
<!DOCTYPE html> <!--[if IE 7]><html id="ie7" <?php language_attributes(); ?>><![endif]--> <!--[if IE 8]><html id="ie8" <?php language_attributes(); ?>><![endif]--> <!--[if !(IE 7) | !(IE 8) ]><!--><html <?php language_attributes(); ?>><!--<![endif]--> <head> <meta charset="<?php bloginfo( 'charset' ); ?>" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" /> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" /> <title><?php wp_title( '|', true, 'right' ); ?></title> <link rel="profile" href="http://gmpg.org/xfn/11" /> <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" /> <?php wp_head(); ?> </head> <body <?php body_class(); ?>> <div class="BackTop">↑</div> <section class="wrap"> <section class="container"> <header class="header" role="banner"> <nav class="nav" role="navigation"> <?php wp_nav_menu( 'theme_location=top_menu&container_class=menu&menu_class=menu&fallback_cb=wp_page_menu&show_home=1' ); ?> </nav><!-- .nav --> <?php echo zinnia_heading(); ?> </header><!-- .header --> <?php echo zinnia_theme_slider(); ?>Found something else, I also saw that I can modify style.css that way :
.header-title {display: block; margin: 0 auto;}
replacing by
.header-title {display: none; margin: 0 auto;}However, it enable these elements on all the pages. Maybe I could write here a kind of “if” condition but I don’t really know anything about this.
Thank you for reading, will very appreciate any help about this!
Best regards,
The topic ‘Remove header on specific page’ is closed to new replies.
