How to edit header for a description meta tag?
-
I’m using the Stargazer theme in wordpress which allows me to choose whether to display header text or not under Appearance > Header.
I chose to not display header text on the webiste by unchecking the option. The problem I have is that by turning this option off, the website doesn’t have a meta description in the header which is kind of needed for SEO purposes. Is there a way around this? Here’s the code in the header.php which I have left untouched for now..
<?php if ( display_header_text() ) : // If user chooses to display header text. ?> <div id="branding"> <?php hybrid_site_title(); ?> <?php hybrid_site_description(); ?> </div><!-- #branding --> <?php endif; // End check for header text. ?> <?php hybrid_get_menu( 'secondary' ); // Loads the menu/secondary.php template. ?> </header><!-- #header --> <?php if ( get_header_image() && !display_header_text() ) : // If there's a header image but no header text. ?> <a href="<?php echo home_url(); ?>" title="<?php echo esc_attr( get_bloginfo( 'name' ) ); ?>" rel="home"><img class="header-image" src="<?php header_image(); ?>" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="" /></a> <?php elseif ( get_header_image() ) : // If there's a header image. ?> <img class="header-image" src="<?php header_image(); ?>" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="" /> <?php endif; // End check for header image. ?>
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘How to edit header for a description meta tag?’ is closed to new replies.