📜  获取当前帖子类别 id wp - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:10.787000             🧑  作者: Mango

代码示例1
global $wp_query;
$postcat = get_the_category( $wp_query->post->ID );