在用query_posts()调用文章列表时,想同时调用每篇文章对应的栏目分类id怎么办?可以这样:
$sticky,cat=>6,showposts=>6, caller_get_posts => 1 ) ); //print_r(query_posts());exit; while(have_posts()) : the_post(); $title = get_the_title(); ?>
cat_ID; ?> 这是分类id号
如果觉得《WordPress 查询调用文章所属的分类id 根据文章id查cat分类栏目id方法》对你有帮助,请点赞、收藏,并留下你的观点哦!