Title: Header Question
Last modified: August 19, 2016

---

# Header Question

 *  [al-c](https://wordpress.org/support/users/al-c/)
 * (@al-c)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/header-question-1/)
 * I am hoping that you can help with the content of my pages.
    My site is [Rhymes For All Times](http://rhymesforalltimes.com/blog)
   In the HEADER- how can the code be changed so the phrase “A Poetic Look At Life
   In New York City” just shows up on the Home page?

Viewing 13 replies - 1 through 13 (of 13 total)

 *  [vangrog](https://wordpress.org/support/users/vangrog/)
 * (@vangrog)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/header-question-1/#post-1323017)
 * [here](http://wordpress.org/support/topic/345547?replies=3#post-1329380)
 *  [Chris_K](https://wordpress.org/support/users/handysolo/)
 * (@handysolo)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/header-question-1/#post-1323018)
 * I guess I was answering this in your other thread as you were posting this.
 * [http://wordpress.org/support/topic/345547?replies=3#post-1329380](http://wordpress.org/support/topic/345547?replies=3#post-1329380)
 *  Thread Starter [al-c](https://wordpress.org/support/users/al-c/)
 * (@al-c)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/header-question-1/#post-1323028)
 * Thank you Chris but I am not sure where this change is inserted.
    Here is a copy
   of my Header code Thank you very much
 *     ```
       <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
           "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
       <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
   
       <head>
       <title><?php wp_title('&laquo;', true, 'right'); ?> <?php bloginfo('name'); ?></title>
       <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
       <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" />
       <link rel="shortcut icon" href="<?php bloginfo('template_directory'); ?>/favicon.ico" />
       <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?>" />
       <link rel="alternate" type="text/xml" title="RSS .92" href="<?php bloginfo('rss_url'); ?>" />
       <link rel="alternate" type="application/atom+xml" title="Atom 1.0" href="<?php bloginfo('atom_url'); ?>" />
       <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
       <?php wp_head(); ?>
       </head>
   
       <body>
       <!-- HEADER -->
       <div id="wrapper">
   
       	<div id="header">
   
       		<div id="raccoglitore">
       			<div id="logo"><h1><a>" title="<?php bloginfo('description'); ?>"><?php bloginfo('name'); ?></a></h1><h2><?php bloginfo('description'); ?></h2></div>
       			<div id="rss"><a>" ><img alt="Tieniti sempre aggiornato sulle ultime di Skimbu!" src="<?php bloginfo('template_directory'); ?>/images/rss.png" /></a></div>
       		</div>
       		<div id="navbar_top"></div>
       		<div id="navbar">
   
       <ul>
       				<li class="page_item"><a>">Home</a> <?php wp_list_pages('sort_order=desc&title_li='); ?>
       			</ul>
       		</div>
       		<div id="navbar_bottom"></div>
       	</div>
   
       	<div id="content">
       	<!-- END HEADER -->
       ```
   
 *  [Chris_K](https://wordpress.org/support/users/handysolo/)
 * (@handysolo)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/header-question-1/#post-1323029)
 * In your header find: `<h2><?php bloginfo('description'); ?></h2>`
 * Replace it with
 *     ```
       <?php if (is_home()) { ?>
          <h2><?php bloginfo('description'); ?></h2>
       <?php } ?>
       ```
   
 *  Thread Starter [al-c](https://wordpress.org/support/users/al-c/)
 * (@al-c)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/header-question-1/#post-1323049)
 * Chris, thank you very much. It worked great! I would have never been able to 
   figure that one out myself. Now that we’re on a roll- how about another.
    How
   do you get the author name to only show up on the home page and not on any other
   pages. Thank you
 *  [Chris_K](https://wordpress.org/support/users/handysolo/)
 * (@handysolo)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/header-question-1/#post-1323052)
 * Glad it helped.
 * Pretty much the same deal for the next one. WordPress themes use [Template Tags](http://codex.wordpress.org/Template_Tags)
   to display data. Locate the theme file that has the tag that your theme is using
   to show the author’s name (it’ll probably have “author” in the name) and then
   use a similar if statement like we used above.
 * Without knowing what your blog theme is or looks like I can only make a guess
   that you probably want to check the theme’s `index.php` file.
 * I hope that gets you in the right neighborhood.
 *  Thread Starter [al-c](https://wordpress.org/support/users/al-c/)
 * (@al-c)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/header-question-1/#post-1323058)
 * Chris,
    This looks like the place in the index php file to make the change. Can
   you hold my hand again and tell me what to do. thanks <h2>By <span style=”color:#
   0066FF”><?php the_author() ?> <?php if(function_exists(‘the_views’)) { the_views();}?
   ></span></h2>
 *  [Chris_K](https://wordpress.org/support/users/handysolo/)
 * (@handysolo)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/header-question-1/#post-1323060)
 * OK, here we go:
 * In your theme’s index.php file find: `<?php the_author() ?>`
 * Replace it with
 *     ```
       <?php if (is_home()) {
         the_author(); ?>
       } ?>
       ```
   
 * See if that’ll work.
 *  Thread Starter [al-c](https://wordpress.org/support/users/al-c/)
 * (@al-c)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/header-question-1/#post-1323063)
 * Ok, we’re only batting 50%- that one didn’t work as got error message when I 
   visited the site. Any other thoughts
    Thank you. If other thoughts fail, do you
   think I could just eliminate that code <h2>By <span style=”color:#0066FF”><?php
   the_author() ?> <?php if(function_exists(‘the_views’)) { the_views(); } ?></span
   ></h2> from the index php file and just put my name on the top of each post as
   they are done on home page?
 *  [Chris_K](https://wordpress.org/support/users/handysolo/)
 * (@handysolo)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/header-question-1/#post-1323068)
 * What was the error? I may have tossed in an extra semi-colon…
 *     ```
       <?php if (is_home()) {
         the_author() ?>
       } ?>
       ```
   
 *  Thread Starter [al-c](https://wordpress.org/support/users/al-c/)
 * (@al-c)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/header-question-1/#post-1323069)
 * I’ll put in the code again and let you know
 *  Thread Starter [al-c](https://wordpress.org/support/users/al-c/)
 * (@al-c)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/header-question-1/#post-1323070)
 * here is the error message
    Parse error: syntax error, unexpected T_ENDWHILE in/
   home/nyres2/public_html/rhymesforalltimes/blog/wp-content/themes/skinbu/index.
   php on line 19
 * here is how the index php is coded
    <?php get_header(); ?> <!– LEFTBAR –> <div
   id=”leftbar”> <?php while (have_posts()) : the_post(); ?> <div id=”post”> <h1
   >“><?php the_title(); ?></h1> <h2>By <span style=”color:#0066FF”><?php if (is_home()){
   the_author() ?> } ?><?php if(function_exists(‘the_views’)) { the_views(); } ?
   ></span></h2>
 *  <div id=”postcontent”><p> <?php the_content(”); ?> </p></div>
 *  Thread Starter [al-c](https://wordpress.org/support/users/al-c/)
 * (@al-c)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/header-question-1/#post-1323084)
 * Chris,
    somehow, I fixed it by going to page.php with original code <h2>By <span
   style=”color:#0066FF”><?php the_author() ?> <?php if(function_exists(‘the_views’)){
   the_views(); } ?></span></h2> I put <!– before code and –> after code and now
   it shows just as I wanted it with Author only showing on home page. Thank you
   very much and am sure will benefit from your help in future as still have a few
   unresolved issues but tortured you enough tonite.

Viewing 13 replies - 1 through 13 (of 13 total)

 The topic ‘Header Question’ is closed to new replies.

## Tags

 * [header](https://wordpress.org/support/topic-tag/header/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 13 replies
 * 3 participants
 * Last reply from: [al-c](https://wordpress.org/support/users/al-c/)
 * Last activity: [16 years, 9 months ago](https://wordpress.org/support/topic/header-question-1/#post-1323084)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
