📅  最后修改于: 2022-03-11 14:48:18.845000             🧑  作者: Mango
echo count_user_posts(USER,'post'); // posts
echo count_user_posts(USER,'page'); // pages
echo count_user_posts(USER,'CUSTOM_POST_TYPE'); // custom post types
// Under a conditional w/ message:
if(count_user_posts(USER,'post') > 10){
echo 'greater than';
} else {
echo 'less than';
}