Remove header only from homepage
-
IM developing a site and i need to NOT show the header and its content On the homepage, it shuld show on the others just not the home.
I will also not want any empty space at the heaader are after removaal, it should only be thevideo background full and content
the theme im using is modular multipurpose wordpress theme.
Can anyone help with this?
The page I need help with: [log in to see the link]
-
It’s best to create a child theme to contain altered template files. Wrap the header code you want to suppress in a conditional like so:
<?php if ( ! is_front_page()): ?> Header HTML goes here <?php endif ?>Manage the spacing, etc. with custom CSS added to the Additional CSS panel of the customizer. You can target only the home page because the body tag should have some unique ID or class (theme dependent) that you can include in your CSS selectors.
hello, ive tried this,
it removes the header but everything n the page is changedcan you please view
https://cookingacademy.qa/Did you also remove the call to wp_header()? That’s necessary for your site to work.
<?php wp_head(); ?> this is the line i have there ,i have just removed it but its the same. @sterndata
THe original header code below
<?php
/**
* header.php
*
* The header for the theme.
*/
?><!DOCTYPE html>
<!–[if !IE]><!–> <html <?php language_attributes(); ?>> <!–<![endif]–><head>
<meta charset=”<?php bloginfo( ‘charset’ ); ?>”>
<meta name=”viewport” content=”width=device-width, initial-scale=1, maximum-scale=1″>
<?php modular_get_header_icons(); ?>
<?php wp_head(); ?>
</head><body <?php body_class(); ?> data-spy=”scroll” data-target=”#main-menu”>
<?php modular_prerloader(); ?>
<?php get_template_part( ‘content/content’, ‘nav’ ); ?>Put the original back and let’s take a look.
What is it you want to remove?
the edited with your suggestions,
is there something i haven’t done right?<?php /** * header.php * * The header for the theme. */ ?> <?php if ( ! is_front_page()): ?> <!DOCTYPE html> <!--[if !IE]><!--> <html <?php language_attributes(); ?>> <!--<![endif]--> <head> <meta charset="<?php bloginfo( 'charset' ); ?>"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <?php modular_get_header_icons(); ?> </head> <body <?php body_class(); ?> data-spy="scroll" data-target="#main-menu"> <?php modular_prerloader(); ?> <?php get_template_part( 'content/content', 'nav' ); ?> <?php endif ?>-
This reply was modified 7 years, 7 months ago by
Steven Stern (sterndata).
i want to remove the header and its content such that when page is loaded you see the full video backgound no header
Put the original back
If this is the theme you’e using
https://themeforest.net/item/modular-multipurpose-responsive-wordpress-theme/19397072
you’re using a commercial theme, so please use their official support channel. We feel they are best equipped to support their products.
https://themeforest.net/item/modular-multipurpose-responsive-wordpress-theme/19397072/support
Commercial products are not supported in these forums. .
-
This reply was modified 7 years, 7 months ago by
Steven Stern (sterndata).
done please @sterndata
.home nav#main-nav, .home .footer-1 { display: none; }To add or override CSS: use the “Additional CSS” option in the customizer. https://codex.wordpress.org/CSS#Custom_CSS_in_WordPress
Learn to use the Chrome Developer Tools to help you see and test changes to your CSS.
Please do not @-ping folks on threads. Thanks.
i got the theme via themeforest free downloads so unable to access their support . please help me if yo can
1. I gave you the CSS to do what you said you wanted to do.
2. It’s a commercial theme. We do not support it here.
thanks alot this worked
-
This reply was modified 7 years, 7 months ago by
The topic ‘Remove header only from homepage’ is closed to new replies.