【发布时间】:2012-02-02 16:03:10
【问题描述】:
我需要在 WordPress 查询中回显一个值。这是我的第一个查询:
<?php if(have_posts()):?>
<?php query_posts('cat=14&posts_per_page=3');?>
<h1><?php echo get_the_category_by_id(14); ?></h1>
<?php the_content();?>
<?php endwhile;?>
<?php wp_reset_query(); ?>
<?php endif;?>
我需要回显的值是:<?php echo $tgh_first_category; ?>
我需要回显它来代替它显示“14”的位置 - 所以我需要用那个回显替换 cat=14 和 id(14)。
我该怎么做?
【问题讨论】: