[英]Allow users coming from a specific link to see private posts in WordPress
[英]Wordpress access to the private posts for specific users
我有點困惑。 默認情況下,當有人嘗試打開私人帖子時,WordPress顯示404錯誤。 我可以擴展一下這個邏輯嗎? 我需要為特定用戶顯示該帖子:
if ( show_post_to_the_user(get_current_user_id()) {
// show this post
}
我嘗試使用the_content過濾器,但沒有幫助。
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,
);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.