Skip Navigation

[Assigned] Custom user role should only see his own private post

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 4 replies, has 1 voice.

Last updated by Marcel 2 hours, 24 minutes ago.

Assisted by: Minesh.

Author
Posts
#2851710

Hi,

On this site, users can add a post via a front-end form, which gets the status "private". But the user should be able to see and edit (only) his own private post. When I give the user role "read_private_posts" permission in Access, he can also see other peoples private posts. Thats not what we want.

#2851946

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Can you please share problem URL where you added the form as well as admin access details.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#2852100

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Can you please share "schipper in spe" role user access details as well.

I have set the next reply to private which means only you and I have access to it.

#2852117

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I see you are using post type archive to display the posts on the fllowing archive:
=> hidden link

Here is the archive in the backend.
- hidden link

I'm not sure why the "Query Filter" section is not available under the "Loop Selection" tab on the right sidebar.

We can filter the posts based on the post author. So, when you add the post from the frontend, user must be logged in - correct? if yes:
- You must set that post author as the current loggedin user. So we can identify that this post is created by this current loggedin user.

Then later on, with the post type archive you crated for the "schip" we can filter the posts based on the post authror equal to the current loggedin user. Is that sounds good?

So, my question is do you set current loggedin user as the author of the post when user create posts from the frontend?

#2852119

A logged-in user should be able to see all ships / posts. But some of those are published as a private post, and they should only see their own private post. So they should see all public published posts, but not private posts except for their own.