Skip Navigation

[Resolved] Add Delete Post link button from block editor

This support ticket is created 3 years, 6 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.

This topic contains 3 replies, has 2 voices.

Last updated by kelvinL-2 3 years, 6 months ago.

Author
Posts
#2151409
Screenshot 2021-08-25 at 9.02.36 PM.png
Screenshot 2021-08-25 at 9.00.37 PM.png

Dear Sir/Madam,

I have a View to display the child post, I want to add a delete post link button beside a dynamic field, I add the shortcode but not work. Please advise how I can do it from the block editor, I know how to do it from an expert editor.

Best regards,

Kelvin

#2151567

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Screenshot 2021-08-25 at 15.48.58.png

Hi Kelvin

I can't quite tell where you are inserting the shortcode to delete a post, but you can insert the link from the Toolset Forms button (just the icon is shown) that is available in the Fields and Text block, or the Classic block, as I point out in the other thread I just replied to.

In this case, you'll be able to choose the Delete post option (screenshot).

#2151935
Screenshot 2021-08-26 at 5.39.41 AM.png

Dear Nigel,

I added the Delete post link in my View but not work

  <td>[wpv-post-id]</td>
  <td>[types field='contestant-mode'][/types]</td>
  <td>[types field='contestant-cname'][/types] [types field='contestant-ename'][/types]</td>
  <td>[get_instrument_name slug="[types field='contestant-instrument'][/types]"] [name_level level="[types field='contestant-apply-level'][/types]"] [types field='contestant-apply-track'][/types]</td>
  <td>[wpv-conditional if="( $(wpcf-contestant-organisation) ne '' )"][types field='contestant-organisation'][/types][/wpv-conditional] [types field='contestant-instructor'][/types]</td>
  <td>[types field='contestant-score'][/types]</td>
  <td>*[cred-delete-post type='button' action='trash' onsuccess='self']Delete[/cred-delete-post]*</td>

I added ** before/after the *cred-delete-post* but I don't see the delete button in the wpv-loop, as my site is being developed locally, I don't have the Internet access for you to check.

#2152047

My issue is resolved by granting the access control to allow specific role to delete post. Thank you Nigel,