判断代码,根据判断启用指定页面
<?php get_header(); //判断首页 if ( is_home() ) {//是 //输出日志标题 if ( is_singular() ) :
the_title( '<ul class="entry-title"><li>', '</li></ul>' );
else :
the_title( '<ul class="entry-title"><li><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></li></ul>' ); endif; } else {//否 get_template_part( 'content', get_post_type() );
}?>顶顶顶