我只想在第一页显示类别说明:
我在我的类别中使用。php:
<?php if(category_description()) :?>
<section class="cat-desc">
<?php echo category_description(); ?>
</section>
<?php endif; ?>
我尝试以下方法:
<?
if (is_category()) {
$page = (get_query_var(\'paged\')) ? get_query_var(\'paged\') : 1;
if ($page == 1) {
echo category_description(); //you don\'t need to include the category id
on the actual category page - wordpress figures it out.
}
}
?>
<?
if (is_tag()) {
$page2 = (get_query_var(\'paged\')) ? get_query_var(\'paged\') : 1;
if ($page2 == 1) {
echo tag_description(); //you don\'t need to include the category id on the
actual category page - wordpress figures it out.
}
}
?>
类别描述正常,但缺少标记描述。
谢谢