I am currently developing a small recruitment style website, and have encountered an issue.
I have created a form (Using Gravity Forms) that allows users to create a custom post (Current Vacancies) and have a hidden field that pulls the post title from one of the other fields dynamically.
However because there will be many posts with an almost identical post title I want to dynamically add a way to identify them through something like NTS0001 Etc. adding an additional number for every new post created.
I use multiple post types to help organise each section of my website and I only want this dynamic number/identifier on to a sing custom post type (called 'current_vacancies'
P.S If possible I would also like this to show in the URL of the post as well. I'm aware Wordpress has the numeric permalink setting however will that always say the same as the post title?
Hopefully this makes sense.
wp_options
, add 1 to it and store it back, unless there is a reasonable chance of two posts being saved at the same time.