简体   繁体   中英

Wordpress private post issue

i want private posts has been show only to members (Login users)

i edit post as private, so only logged in user users can see these posts but its also not shown to logged in users

i also use this in functions.php

$subrole = get_role( 'subscriber' );

// For private pages

$subrole->add_cap( 'read_private_pages' );

/// For private posts

$subrole->add_cap( 'read_private_posts' );

but in vain

please help

Please try this plugin http://wordpress.org/plugins/wp-admin-hide-others-posts/ This plugin creates a new permission, "view_others_posts". When viewing the posts lists in the admin area, users without the "view_other_posts" permission will only see there own posts, not the posts of other users. That plugin will help you to change as you like

otherwise you can try this plugin http://wordpress.org/plugins/advanced-access-manager/ this plugin will help to manage all roles, it is very simple.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM