Title: Homepage Header Text
Last modified: August 18, 2016

---

# Homepage Header Text

 *  [kashifamin](https://wordpress.org/support/users/kashifamin/)
 * (@kashifamin)
 * [19 years, 8 months ago](https://wordpress.org/support/topic/homepage-header-text/)
 * Hi there,
    Could someone please help me with the following?
 * I would like to place some intro text and an image to appear above my posts on
   the hompage of my site (www.bicentre.org.uk). I understand I need to use the 
   is_home() tag, however I am unsure as to where this needs to be placed. My site
   has the following index.php
 * <?php
 * include_once(‘gravatar.php’);
 * get_header();
    ?>
 * <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <is_home()>
 * <div class=”post”>
    <h3 class=”storytitle” id=”post-<?php the_ID(17); ?>”>” rel
   =”bookmark”><?php the_title(); ?>
   </h3>
    <div class=”meta”><?php _e(“Filed under:”);?
   > <?php the_category(‘,’) ?> — <?php the_author() ?> at <?php the_time(‘g:i a’)?
   > on <?php the_time(‘l, F j, Y’) ?> <?php edit_post_link(__(‘Edit This’)); ?>
   </div>
 *  <div class=”storycontent”>
    <?php the_content(__(‘(Read on …)’)); ?> </div>
 *  <div class=”feedback”>
    <?php wp_link_pages(); ?> <?php comments_popup_link(
   __(‘Comments (0)’), __(‘Comments (1)’), __(‘Comments (%)’)); ?> </div>
 *  <!–
    <?php trackback_rdf(); ?> –>
 * </div>
 * <?php comments_template(); ?>
 * <?php endwhile; else: ?>
    <p><?php _e(‘Sorry, no posts matched your criteria.’);?
   ></p> <?php endif; ?>
 * <?php posts_nav_link(‘ — ‘, __(‘« Previous Page’), __(‘Next Page »’)); ?>
 * <?php get_footer(); ?>
 * Any ideas?

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

 *  [zoutesnor](https://wordpress.org/support/users/zoutesnor/)
 * (@zoutesnor)
 * [19 years, 8 months ago](https://wordpress.org/support/topic/homepage-header-text/#post-498328)
 * I really don’t have clue what you’d want to do, but the is_home() tag is normally
   used like this:
    `if (is_home()){ <!-- do stuff --> } else { <!-- do other stuff--
   > } The else part is not madatory though.
 * Another thing, you’ve placed te is_home() tag in the loop of your index.php, 
   normally you’d put it in header.php.
 *  Thread Starter [kashifamin](https://wordpress.org/support/users/kashifamin/)
 * (@kashifamin)
 * [19 years, 8 months ago](https://wordpress.org/support/topic/homepage-header-text/#post-498335)
 * Thanks for the tips!
    (Sorry if I sound muddled, I am very new to WordPress and
   am a beginner with code!)
 * Just to clarify my need, I have some text that introduces the website i.e. ‘welcome
   to our website…etc’ and a supporting image. I just want this text and image appear
   on the homepage first and all recent posts to appear beneath the text.
 * Am I correct to be using the is_home() tag to achieve this?
 * Is there another way?
 *  [zoutesnor](https://wordpress.org/support/users/zoutesnor/)
 * (@zoutesnor)
 * [19 years, 8 months ago](https://wordpress.org/support/topic/homepage-header-text/#post-498341)
 * No, the is_home tag is fine for this. Just put in your header.php, just before
   the `<!-- end header -->` code. Be sure to use the php tags, like this:
    `<div
   id="content"> <?php if (is_home()){ ?> <!-- Put your message here --> <?php }?
   >
 *  Thread Starter [kashifamin](https://wordpress.org/support/users/kashifamin/)
 * (@kashifamin)
 * [19 years, 8 months ago](https://wordpress.org/support/topic/homepage-header-text/#post-498345)
 * Thanks for this.
 * You pointed me in the right direction. However, I found that it worked for me
   by placing the code in index.php just before the WordPress loop. This is what
   I did for reference:
 * <?php // Welcome Text
    if ( is_home() ) { ?>
 * My intro text….
 * <?php } ?>

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

 The topic ‘Homepage Header Text’ is closed to new replies.

## Tags

 * [homepage](https://wordpress.org/support/topic-tag/homepage/)
 * [index.php](https://wordpress.org/support/topic-tag/index-php/)
 * [text](https://wordpress.org/support/topic-tag/text/)

 * In: [Requests and Feedback](https://wordpress.org/support/forum/requests-and-feedback/)
 * 4 replies
 * 2 participants
 * Last reply from: [kashifamin](https://wordpress.org/support/users/kashifamin/)
 * Last activity: [19 years, 8 months ago](https://wordpress.org/support/topic/homepage-header-text/#post-498345)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
