Skip Navigation

[Resolved] CRED form edit post link for pending post

This thread is resolved. Here is a description of the problem and solution.

Problem:

How can I allow editing of post and show the link even if the status is not publish (pending or draft)

Solution:

It had to do with the permissions given to custom roles crated through Toolset Access plugin, see the solution: https://toolset.com/forums/topic/cred-form-edit-post-link-for-pending-post/#post-1072550

Relevant Documentation:

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.

This topic contains 5 replies, has 2 voices.

Last updated by Sasank 3 years ago.

Assigned support staff: Luo Yang.

Author
Posts
#1072422

I am creating a custom post listing page when they register and made the status as draft (https://toolset.com/forums/topic/have-a-band-admin-role-to-manage-cpt-band-listing-page/).

Added a link on my accounts page to edit the listing created while registration of account. The link is not showing up until the listing/post status is publish. I would want the user to be able to edit the listing and add the details before it is been reviewed. I checked the documentation for shortcode but I could not get anything related to it. (https://toolset.com/documentation/user-guides/views-shortcodes/#toolset-edit-post-link)

How can I allow editing of post and show the link even if the status is not publish (pending or draft)

#1072440

Forgot to mention, the shortcode I am using for the link is

[toolset-edit-post-link layout_slug="edit-company"]<i class="fa fa-pencil-square-o"></i> Edit listing[/toolset-edit-post-link]
#1072472

Luo Yang
Supporter

Languages: English (English ) Chinese (Simplified) (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

Hello,

I suggest you try these:
1) Create a post view, list listing posts, and filter by:
a) post author is current user
https://toolset.com/documentation/user-guides/filtering-views-query-by-author/
b) post status is any
https://toolset.com/documentation/user-guides/filtering-views-query-by-post-status/

2) Then you will get all current user's "pending" status posts, then follow our document to display the edit form link
https://toolset.com/documentation/user-guides/displaying-cred-editing-forms/

#1072529

Thanks for your reply Luo.

I already got the list in place. The issue is edit link is getting hidden if the post status is not publish.

#1072542
Capture.JPG

Please refer to screenshot attached

#1072550

I just figured out that it had to do with the permissions given to custom roles crated through Toolset Access plugin. I copied from Subscriber while creating new role and that user role didnt have edit permissions. I changed it, started working fine now.