我需要检查某个帖子是否属于某个类别或属于某个类别的后代。是否有为此的wordpress功能,或者我需要自己做?
编辑:我应该提到 WP 版本是 2.7。对不起
对于 2.7 或更高版本,请使用 in_category( $category, $_post )
问候, 维姬·比斯瓦斯
另请参阅:http: //codex.wordpress.org/Function_Reference/in_category#Testing_if_a_post_is_in_a_descendant_category
sql 查询可以与 wordpress 2.8 一起使用吗?