• Resolved Achintha

    (@achintha)


    Hai Everyone,

    I need assistant to remove the Header from this theme. Theme is “Oblique“.
    There is a huge header in that Theme.I want to remove it completely from the site.Can you people please help me??Im not a PHP expert im new to this field.

    Thank you in advance,
    Achintha

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter Achintha

    (@achintha)

    below is the Header PHP File. in the theme..
    
    <?php
    /**
     * The header for our theme.
     *
     * Displays all of the <head> section and everything up till <div id="content">
     *
     * @package Oblique
     */
    ?><!DOCTYPE html>
    <html <?php language_attributes(); ?>>
    <head>
    <meta charset="<?php bloginfo( 'charset' ); ?>">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="profile" href="https://gmpg.org/xfn/11">
    <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
    <?php if ( get_theme_mod('site_favicon') ) : ?>
    	<link rel="shortcut icon" href="<?php echo esc_url(get_theme_mod('site_favicon')); ?>" />
    <?php endif; ?>
    
    <?php wp_head(); ?>
    </head>
    
    <body <?php body_class(); ?>>
    <div id="page" class="hfeed site">
    	<a href="#content"><?php _e( 'Skip to content', 'oblique' ); ?></a>
    
    	<div class="sidebar-toggle"><i class="fa fa-bars"></i></div>
    
    	<?php if ( has_nav_menu( 'social' ) ) : ?>
    		<nav class="social-navigation container clearfix">
    			<?php wp_nav_menu( array( 'theme_location' => 'social', 'link_before' => '<span class="screen-reader-text">', 'link_after' => '</span>', 'menu_class' => 'menu clearfix', 'fallback_cb' => false ) ); ?>
    		</nav>
    	<?php endif; ?>	
    
    	<div class="svg-container nav-svg svg-block">
    		<?php oblique_svg_3(); ?>
    	</div>
    	<header id="masthead" class="site-header" role="banner">
    		<div class="overlay"></div>
    		<div class="container">
    			<div class="site-branding">
    	        <?php if ( get_theme_mod('site_logo') && get_theme_mod('logo_style', 'hide-title') == 'hide-title' ) : //Show only logo ?>
    				<a>" title="<?php echo esc_attr(get_bloginfo('name')); ?>"><img class="site-logo" src="<?php echo esc_url(get_theme_mod('site_logo')); ?>" alt="<?php echo esc_attr(get_bloginfo('name')); ?>" /></a>
    	        <?php elseif ( get_theme_mod('logo_style', 'hide-title') == 'show-title' ) : //Show logo, site-title, site-description ?>
    				<a>" title="<?php echo esc_attr(get_bloginfo('name')); ?>"><img class="site-logo show-title" src="<?php echo esc_url(get_theme_mod('site_logo')); ?>" alt="<?php echo esc_attr(get_bloginfo('name')); ?>" /></a>
    				<h1 class="site-title"><a>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
    				<h2 class="site-description"><?php bloginfo( 'description' ); ?></h2>
    	        <?php else : //Show only site title and description ?>
    				<h1 class="site-title"><a>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
    				<h2 class="site-description"><?php bloginfo( 'description' ); ?></h2>
    	        <?php endif; ?>
    			</div><!-- .site-branding -->
    		</div>
    		<div class="svg-container header-svg svg-block">
    			<?php oblique_svg_1(); ?>
    		</div>
    	</header><!-- #masthead -->
    
    	<div id="content" class="site-content">
    		<div class="container content-wrapper">

    First of all, you should not edit your theme files directly. If the theme gets updated because of feature enhancements, bug fixes, or security patches, or if the theme has to be updated because of a change to the WordPress core, then your changes will be lost. Instead, create a child theme and make your changes to a copy of header.php.

    In your child theme copy of header.php, you’ll want to remove everything starting with this line:

    <header id="masthead" class="site-header" role="banner">

    down to, and including, this line:

    </header><!-- #masthead -->

    Note that by removing the header, you will not see the site title on your site. There are other ways of making the header smaller if it’s too big.

    Thread Starter Achintha

    (@achintha)

    Thank you very much for the support CrouchingBruin.

    If i am to reduce the size of the Header What Should i Do??
    I first wanted to reduce the size of the Header, i searched for any plugin but couldn’t locate one..That’s why i thought of removing it.

    Thank you,
    Achintha

    Ues a CSS plugin, like Jetpack or Custom CSS Manager. Then add these two CSS rules:

    @media only screen and (min-width: 768px)
    {
       .site-header {
          height: 449px;
       }
       .site-branding {
          padding: 150px 0;
       }
    }

    The first rule controls the height of the header. The second rule positions the site title inside the header. The values listed are what is currently in effect. You can try reducing the height to 300px and the padding to 75px (from 150px) to make the header shorter. Note that it’s inside a media query, so it only affects screen sizes larger than a tablet (desktop sizes).

    Thread Starter Achintha

    (@achintha)

    Thank you soo much CrouchingBruin. I will Try this. I really love this Culture of Collaboration in WordPress.. Thank you Very much

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Removing Header’ is closed to new replies.