我想说,插件是处理会员资格的非常简单的方法,除非你想要它的规模很小,比如几个页面/帖子等。
在这种情况下,您可以根据需要注册用户级别,分配功能,然后在每个页面/帖子上进行检查if ( current_user_can() )
这可能是一个解决方案,可以管理小规模的事情。
这方面的一个小片段是
if ( current_user_can( $capability, $args ) ) {
// The code for the page goes here
} else {
// redirect to the home page or to some page telling the user he is not capable to see the page
}
引用当前\\u user\\u can
LINK