Subscribe By RSS or Email

November 4, 2009

Add Custom Content for Your Blog’s Index Page




  • Buffer



  • Buffer

Most of the time we want our index page to the flashiest page on our site. A while ago I wanted to put a dynamic slideshow and special copy on my home page that wouldn’t show up on the rest of the site (and oversized, 2009-trendy intro header sentences written in first-person don’t count). It’s easy enough to do with plain ol’ CSS and HTML — even with the bulk of simple CMSs — but might be a bit more of a hassle with WordPress.

Never fear. It’s so much easier than you think. In fact, it’s so easy to add custom content for your index you’ll wonder why you didn’t do it before.

Ready? Here’s all the code you need for WordPress:


<? php
 if ( is_home() ) { include ('special_index_content.php'); }
?>

Now you can save your specialized content as ”special_index_content.php” (or ”Lafawnduh.php” for all I care) and you have an easy-to-update way to add custom content to your WP home page.



Related Posts Plugin for WordPress, Blogger...

Read more from Blogging
About the author, Derek Land

Derek has been designing & writing since childhood and more recently has designed & developed for international projects, as well as written for several digital magazines. He lives in New York with his family, two cats, and vintage Italian espresso maker. You should follow him on Twitter

On Twitter

We're teaming up with ThriveSolo for a giveaway! We have memberships for ThriveSolo Project Management - FREE. Watch this space for details