Skip Navigation

[Resolved] redirect after [cred_delete_post_link]

This support ticket is created 4 years, 1 month 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.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Tagged: 

This topic contains 3 replies, has 2 voices.

Last updated by Christian Cox 4 years, 1 month ago.

Assisted by: Christian Cox.

Author
Posts
#1505359

I created a view with the list of articles made by a user, in this list there is the button to delete a post, I used the shortcode:

[cred_delete_post_link action='trash' class='btn btn-danger cred-refresh-after-delete' message='Vuoi veramente eliminare questo post?' message_show='1']Elimina[/cred_delete_post_link]

I would like to insert a redirect to a page after deleting an article, what can I do?

#1505677

Hello, you can use the "redirect" shortcode attribute to redirect to any post or page. You must place the post ID in the redirect shortcode attribute value. For example, if you want to redirect to a page with ID 21, you would use a shortcode like this:

[cred_delete_post_link action='trash' redirect='21' class='btn btn-danger cred-refresh-after-delete' message='Vuoi veramente eliminare questo post?' message_show='1']Elimina[/cred_delete_post_link]

We have documentation for this shortcode available here: https://toolset.com/documentation/user-guides/front-end-forms/cred-shortcodes/#cred_delete_post_link

Let me know if this isn't working as expected.

#1506793

the link redirect works fine, how can I if it is possible to insert in this link a form to ask for data (select among more choices) on why the related article was deleted?

#1507415

I don't know of an easy way to accomplish this with the cred_delete_post_link shortcode. I think you would have to create a custom field somewhere to store that information, and use another Form to capture that information. Then use custom code to delete the original post somehow..it sounds fairly complex.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.