我有点困惑。默认情况下,当有人试图打开私人帖子时,WordPress会显示404错误。我可以延长那个逻辑吗?我需要为特定用户显示该帖子:
if ( show_post_to_the_user(get_current_user_id()) {
// show this post
}
我尝试使用 the_content 过滤器,但它没有帮助。
答案 0 :(得分:0)
When you call post in back end then post status give both
$args = array(
'orderby' => 'date',
'order' => 'DESC',
'post_type' => 'post',
'post_status' => 'publish,private',
'posts_per_page' => 6,
);