还是不同分类日志模板问题
<?php if (is_category('Category A')) { ?><p>This is the text to describe category A</p>
<?php } elseif (is_category('Category B')) { ?>
<p>This is the text to describe category B</p>
<?php } else { ?>
<p>This is some generic text to describe all other category pages,
I could be left blank</p>
<?php } ?>
按照官方的这样的代码还是不行
<?php
$post = $wp_query->post;
if ( in_category('12') ) {
include(TEMPLATEPATH . '/singleHighlightTour.php');?>
<?php } elseif { ( in_category('64') {
include(TEMPLATEPATH . '/singleHistoric.php');?>
<?php } elseif { ( in_category('70') {
include(TEMPLATEPATH . '/singleLijiang.php'); ?>
<?php } elseif { ( in_category('11') {
include(TEMPLATEPATH . '/singleRecommended.php');
<?php } elseif { ( in_category('7') {
include(TEMPLATEPATH . '/singleSilkRoad.php');
<?php } elseif { ( in_category('13') {
include(TEMPLATEPATH . '/singleSingleCity.php');
<?php } elseif { ( in_category('69') {
include(TEMPLATEPATH . '/singleTibet.php');
<?php } elseif { ( in_category('62') {
include(TEMPLATEPATH . '/singleYangtzeRiver.php');
<?php } else { {
include(TEMPLATEPATH . '/singlectg.php');
} }
?>
这个也是不成 不知道怎么搞了 郁闷死了
高人来出来帮忙下 这个问题貌似很难解决啊 这个问题我也不知道。我用了以后,单篇日志显示重复,在foot下面又显示了一次
页:
[1]