Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 10 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(2)
用于角色管理的最强大的 WordPress 插件是“Role Scoper”。更轻量级的替代方案是“Members”。
如果这两者都不能满足您的要求,那么就别再犹豫了——那就没有之一了。
您必须编写自己的插件或将所需的功能添加到主题的
functions.php< /代码>
。您必须使用全局变量
$current_user;
并检查它的角色存在、用户名或用户 ID。帮助您入门的代码片段:pre_get_posts
操作可能是一个很好的挂钩。The most powerful wordpress plugin for role management is "Role Scoper". A more light-weight alternative would be "Members".
If neither one of these two meets your requirements, look no further - then there isn't one.
You'd have to either write your own plugin or add the required functionality to your theme's
functions.php
. You'd have to make use of the global variable$current_user;
and check it either for role presence, usernames or user IDs. A snippet to get you started:The
pre_get_posts
action might be a good one to hook into.这可能是旧消息,但是您正在寻找的另一个选择可能是江苏默元酒店管理有限公司。
http://www.s2Member.com
他们有免费和付费模式。享受。
This might be old news but, another option for what you're looking for could be s2Member.
http://www.s2Member.com
They have both free and paid models. Enjoy.