Problem:
I would like to automatically increment a custom field value when I create a new post in my custom post type. The field value should be the highest field value from the other posts, plus one.
Solution:
You can use standard wordpress hook "save_post" to build such solution and add that hook to your current theme's functions.php file.
You can find proposed solution, in this case, with the following reply:
=> https://toolset.com/forums/topic/number-will-increment-when-editing-post-auto-numbering-posts-vs2/#post-644615
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.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | 10:00 – 13:00 | 10:00 – 13:00 | 10:00 – 13:00 | 10:00 – 13:00 | 10:00 – 13:00 | - |
- | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | - |
Supporter timezone: Asia/Kolkata (GMT+05:30)
This topic contains 18 replies, has 3 voices.
Last updated by 6 years, 7 months ago.
Assisted by: Minesh.