This support ticket is created 4 years, 5 months ago. There's a good chance that you are reading advice that it now obsolete.
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.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
Hi I was wondering if there was a way of using Access or any other Toolset tool so i could allow subscribers to view non-published posts on my site.
The use case is that subscribers can create a "ticket" on the site using Toolset forms. This ticket is a custom post with the status Pending Review. Later on an editor can approve the post and changing its status to published - but until the post is published the subscriber who created the post cannot see it.
Hello. Thank you for contacting the Toolset support.
I would like to know where you want to display the list of tickets that user created. Do you mean that you want to display the tickets created by subscriber user on frontend?
That's correct - I want subscribers to be able to see posts that are in draft, pending review etc. Currently when they click on the link for a post with the status of draft, pending review etc they get a page not found error whereas if an admin clicks on the same link they are able to view the post.
So for example and admin clicks on the link for this post which has the status pending review and they are able to see the post - hidden link
But IF someone with the subscriber level role clicks on the same link it redirects them to the below url which displays an Oops this page cant be found message
According to WordPress, the pending post Awaiting a user with the publish_posts capability. In other words, a post that is pending is a post that is not published meaning that it can not be viewed by not registered users with at least the publish_posts capability (Editor etc). So public users can not view the post. That's why the url is not "working".
=> https://wordpress.org/support/article/post-status/#pending
So, this is works normally as per the wordpress standard. If you want to allow users to see pending posts, you need to give enough permission to your role by installing Toolset Access plugin and in advanced mode edit your subscriber role and give the permissions.
So just to clarify - in order for my subscribers to be able to view non-published posts I need to install Access and then use Access to give them the publish_posts capability?
If so, Access doesn't seem to allow the subscriber role to be modified (it only allows to view not change permissions) - is there a way to enable this?
So just to clarify - in order for my subscribers to be able to view non-published posts I need to install Access and then use Access to give them the publish_posts capability?
==>
No, I mean to say that Editor role have rights of publish_posts capability so that those users with publish_posts capability can publish the post.
The better way could be, what if you add a custom filed with status in-Active. And Then list the tickets with In-active status and Editor should change the status to Active. Will that help? (In this case by dedult the post will be published)
That makes total sense but i'm not sure it works in my scenario. One of the reasons i initially used status changes in the first place was because i need a notification sent when status changes (using toolset form). I.e when the post is created it has a status of pending review and the editor is emailed to let them know a post is waiting their approval. They then change the post status to published (using toolset edit form) at which stage the original creator of the email is notified.
Is there some way of sending a notification when a field is selected. I.e if the editor changes the checkbox to approved as suggested could this trigger a notification to the post creator?
What if you create a select custom field with whatever statuses like (pending, approved,cancelled etc..etc..) and set the notification trigger on "When Custom Fields are modified"? Will that help?