by Hiroshi on November 30th, 2008
Recently I wanted to display little about section me at my blog but just at home page and single post under sidebar. So how we can tell that we are at home page or at single post in case of WordPress Blog? Here is the code:
<?php if ( is_front_page() or is_home() or is_single() ) { ?> Your content goes here. <? } ?>
is_front_page() and is_home() both will server same purpose.
Put this code anywhere in your blog containing some content in the middle and it should display that content when just single post is viewed or home page of blog is being viewed.



[...] example here: How To Display Some Content at Just Home Page and Single Post of Blog .myForm td, input, select, textarea, checkbox { font-family: tahoma; font-size: 12px; } [...]
Wonderful. :D