I wanted to add a little snippet of unique text, and have it display on my self hosted WP blog home page ONLY. It was actually very easy.
I added this code to my theme index.php:
<?php if(is_home() && !is_paged()):?>write text here<?php endif;?>
Note – I did not want a static home page for my wordpress blog (I wanted to display all my posts, but on the home page, just have a small piece of text on my blog home and no other pages or posts).
- The Best WordPress SEO Plugin
- Advice – Nofollow Blog Comments
- Do WordPress Self Pings Waste Pagerank?
- Host WordPress blog in a subdomain or directory?
- How To Exclude A Category or Post From RSS Feed in WordPress
- List Recent Posts From Single Category on Posts Within Same Category
- Add Text To Home Page Only on WordPress Blog
- WordPress Contact Form 7 Redirect To Thank You Page
- Speed Up Contact Form 7 Plugin For WordPress
- Dynamic PHP Copyright Notice in WordPress
- How To Import Large WordPress XML File Above Default Limit Size