WordPress根据用户级别隐藏可见内容-WordPress主题

摘要:以轻cms定位的wordpess似乎一直对用户功能没有做太多的功能实现和介绍,或是最基础的用户级别可以限制还是有的,可通…

以轻cms定位的wordpess似乎一直对用户功能没有做太多的功能实现和介绍,或是最基础的用户级别可以限制还是有的,可通过下面代码实现对应用户等级的可见内容设置。

WordPress 用户等級

管理员:Administrator: level 10
编辑:Editor: Level 7
作者:Author: Level 4
投稿者:Contributor: Level 2
订阅者:Subscriber: Level 0
访客: Level 在 0 以下
仅管理員可见

按照用户等級显示不同的內容

来源:http://www.wazhuti.com/461.html

微信公众号
手机浏览(小程序)

Warning: get_headers(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(): Failed to enable crypto in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(https://static.shanhubei.com/qrcode/qrcode_viewid_12923.jpg): failed to open stream: operation failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57
0
分享到:
没有账号? 忘记密码?