Skip Navigation

[Resolved] Cred delete post hook

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

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

Supporter timezone: America/Jamaica (GMT-05:00)

Tagged: 

This topic contains 1 reply, has 2 voices.

Last updated by Shane 7 years, 2 months ago.

Assisted by: Shane.

Author
Posts
#565950

Hi,
I have a problem with my site. I created a custom post and all post have a field called "priority". All post, have a different priority, I need this field to set a kind of order. When I delete a post (by cred_delete_post_child button), I need to change to all other post, the field "priority" value.

So if I have 5 posts I'll have:

NAME --> PRIORITY
POST1 --> 1
POST2 --> 2
POST3 --> 3
POST4 --> 4
POST5 --> 5

If I delete the post with priority set as 2, all post with priority > 2 need to change priority in "priority - 1";

And I'll have:

POST1 --> 1
POST3 --> 2
POST4 --> 3
POST5 --> 4

How can I do that?

Thank,
M.

#565989

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Marco,

Thank you for contacting our support forum.

I see what you are trying to achieve, unfortunately this wouldn't be possible without the use of some custom coding to update each posts custom field.

Unfortunately the custom code required to achieve this would be out of the scope of our support forum and I would recommend that you contact one of our consultants to assist with the custom code for this.
https://toolset.com/consultant/

Thanks,
Shane