Here is a handy WordPress theming tip that I have been using for some time now on my web sites. Have a block of text that you would only like to have shown on the main web page index?
Here is the code you’ll want to use:
<?php if ( is_home() || is_page() ) { ?>content only shown on your index page<?php }?>
Replace content only shown on your index page with your own content and then paste that into your WordPress template file. Here are a few more resources to help you out if you want to go a little further with this.
Now where would this come in handy? Well I use it to hide my links and long Google AdSense ad from all places but the index in my sidebar. It might also be useful if you wanted to display a greeting at the top of your web site or blog and only show that greeting on the index page. Truth be told, your imagination is the only limit with this tweak.



Comments and Feedback