最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

custom post types - Restrict category access to specific usersgroups. Author always has access

programmeradmin1浏览0评论

I'm running a Wordpress website. I want to make some of the content on it - posts and custom post types, who belong to a specific category - accessible only to the users, who have been granted access to this category. However, the post author himself should always have access to his post, regardless if he has been granted access to the post category or not.

To put it in other words, you can imagine the website as some sort of a freelance marketplace platform. A user posts a job that gets visible to a specific subset of freelancers. Other freelancers don't see it. The user himself has access to his job post, but can't see other users' posts as well - he can see only his posts.

I've looked for a plugin who could accomplish this, but haven't found one so far - User Access Manager works fine for the category access stuff, but its option to always grant author access to his posts doesn't work. Groups plugin also works for the category access, but doesn't work for the author access - it doesn't even have an option for it, and thus it also doesn't do the job I'm looking for.

Has anyone else done something like this? Will be glad if you can help with suggestions how this could be accomplished.

Thank you very much.

I'm running a Wordpress website. I want to make some of the content on it - posts and custom post types, who belong to a specific category - accessible only to the users, who have been granted access to this category. However, the post author himself should always have access to his post, regardless if he has been granted access to the post category or not.

To put it in other words, you can imagine the website as some sort of a freelance marketplace platform. A user posts a job that gets visible to a specific subset of freelancers. Other freelancers don't see it. The user himself has access to his job post, but can't see other users' posts as well - he can see only his posts.

I've looked for a plugin who could accomplish this, but haven't found one so far - User Access Manager works fine for the category access stuff, but its option to always grant author access to his posts doesn't work. Groups plugin also works for the category access, but doesn't work for the author access - it doesn't even have an option for it, and thus it also doesn't do the job I'm looking for.

Has anyone else done something like this? Will be glad if you can help with suggestions how this could be accomplished.

Thank you very much.

Share Improve this question asked Jun 16, 2017 at 18:59 Nikolay M.Nikolay M. 1
Add a comment  | 

1 Answer 1

Reset to default 1

You can assign meta values to users and can add a conditional statement in template to check if the user is having the permission to access the file, if not then redirect them to some other page.

发布评论

评论列表(0)

  1. 暂无评论