Hide Site-Title and Tagline only on Home Page
-
I’ve tired every code I could find and I can’t seem to hide the site-title and tagline description on only the home page for the Butterbelly Theme. I managed to hide it entirely but that’s not I want.
Class ID is site-title and h1
Here’s my header code.
<?php
/**
* The Header for our child theme.
*
* Displays all of the <head> section and everything up till <div id=”main”>
*
*/
?>
<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01//EN” “https://www.w3.org/TR/html4/strict.dtd”>
<html <?php language_attributes(); ?>>
<head>
<meta charset=”<?php bloginfo(‘charset’); ?>” />
<title>
<?php wp_title(‘|’, true, ‘right’); ?>
</title>
<meta name=”viewport” content=”width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0″ />
<link rel=”profile” href=”https://gmpg.org/xfn/11″ />
<link rel=”pingback” href=”<?php bloginfo(‘pingback_url’); ?>” />
<link rel=”stylesheet” type=”text/css” media=”all” href=”<?php echo get_stylesheet_uri(); ?>” />
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<?php if (butterbelly_get_option(‘butterbelly_nav’) != ”) { ?><?php echo stripslashes(butterbelly_get_option(‘butterbelly_nav’)); ?>
<?php } else { ?> <?php _e(‘Pages Navigation Menu’,’butterbelly’);?><span></span>
<?php } ?>
<?php butterbelly_nav(); ?>
</div>
</div>
</div>
<div class=”clear”></div>
</div>
</div>
<div class=”index_container”>
<div class=”header_container <?php if (is_home()) { ?> <?php
} else {
echo ‘not_home’;
}
?>”>
<div class=”container_24″>
<div class=”grid_24″>
<div class=”header”>
<div class=”logo”>
<?php if (butterbelly_get_option(‘butterbelly_logo’) != ”) { ?>
“><img src=”<?php echo butterbelly_get_option(‘butterbelly_logo’); ?>” alt=”<?php bloginfo(‘name’); ?> logo”/>
<?php } else { ?>
<hgroup>
<p class=”site-title”>” title=”<?php echo esc_attr(get_bloginfo(‘name’, ‘display’)); ?>” rel=”home”><?php bloginfo(‘name’); ?></p>
<h4 class=”site-description”><?php bloginfo(‘description’); ?></h4>
</hgroup>
<?php } ?>
</div>
</div>
</div>
<div class=”clear”></div>
</div>
</div>
- The topic ‘Hide Site-Title and Tagline only on Home Page’ is closed to new replies.