0
嗨我有15页2类别..例如类别A和类别B ....虽然这样做我已显示标题和内容...但固定链接正在创建类别A不是类别B我...如何代码以获取第二类固定链接...固定链接对于多个类别
$cat = get_the_category();
$id= $cat[0]->term_id;
$id1= $cat[1]->term_id;
$args = array('posts_per_page' => 15,
'cat'=> $id1,
'orderby'=> 'post_date',
'order'=> 'ASC',
'paged' => $paged,
'post_type'=> 'post',
'post_status' => 'publish');
query_posts($args);
if (have_posts()) while (have_posts()) : the_post();
$i++;
?>
<li><a href="<?php echo get_permalink(); ?>"><?php the_title();?></a></li>
<?php
endwhile;
wp_reset_query();
?>
但固定链接是创造的$ id ...
伙计,使用两个[Foreach](http://codex.wordpress.org/Template_Tags/get_posts)循环。 – yeshansachithak