Title: Help on header display
Last modified: August 20, 2016

---

# Help on header display

 *  Resolved [nvs74191](https://wordpress.org/support/users/nvs74191/)
 * (@nvs74191)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/help-on-header-display/)
 * I am not a coder, and need some help please.
 * Bascially, I am looking for a code to stick in my header.php that would:
 * on the home page, show the site name as the heading;
    on the category page, show
   the category name as the heading, and on single posts page, show the title of
   the post as the heading
 * with all these headings wrapped in h1 tags.
 * Can the experts here help?
 * Thanks
 * Swaminathan

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

 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/help-on-header-display/#post-2334433)
 *     ```
       <?php if( is_front_page() ) {
       echo '<h1>'.bloginfo('name').'</h1>';
       } elseif( is_category() ) {
       echo '<h1>'; single_cat_title(); echo '</h1>';
       } elseif( is_single() ) {
       echo '<h1>'; the_title(); echo '</h1>';
       } ?>
       ```
   
 * [http://codex.wordpress.org/Conditional_Tags](http://codex.wordpress.org/Conditional_Tags)
   
   [http://codex.wordpress.org/Function_Reference/bloginfo](http://codex.wordpress.org/Function_Reference/bloginfo)
   [http://codex.wordpress.org/Function_Reference/single_cat_title](http://codex.wordpress.org/Function_Reference/single_cat_title)
   [http://codex.wordpress.org/Function_Reference/the_title](http://codex.wordpress.org/Function_Reference/the_title)
 *  Thread Starter [nvs74191](https://wordpress.org/support/users/nvs74191/)
 * (@nvs74191)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/help-on-header-display/#post-2334450)
 * That worked, thanks. This was exactly what I wanted to achieve.
 * Cheers
 * Swaminathan

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

The topic ‘Help on header display’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [nvs74191](https://wordpress.org/support/users/nvs74191/)
 * Last activity: [14 years, 7 months ago](https://wordpress.org/support/topic/help-on-header-display/#post-2334450)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
