指定example.php中的内容只在首页显示
<?php if ( is_home() ) { include ('example.php'); } ?>
为不同分类指定不同的样式表
<?php if ( is_category('15') ) {<link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/cat-15.CSS"
type="text/css" media="screen" />;
<?php } else { ?>
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>"
type="text/css" media="screen" />
<?php } ?>
为不同的分类指定不同的图像
<?php if (is_category('7') ):<img src='<?php bloginfo('template_url');?>/images/cat7.jpg' alt='' />
<?php } elseif (is_category('8') ):
<img src='<?php bloginfo('template_url');?>/images/cat8.jpg' alt='' />
<?php endif; ?>