I have stumbled upon a brilliant piece of code that just fits my needs on this thread : Using custom field as custom post title by @chrisguitarguy and I was hoping there might be a way to tweak it to use several custom fields’ input to populate a CPT’s title.
For example, to be sure there will never be any case of twice the same title being generated I would like to use a custom field named dlc_media_photos_titre
followed by another named dlc_media_photos_date
, this way I should obtain a title in this format : Photo gallery name 20210921
.
The date format doesn’t really matter, it is just a security to include it in the title.
Thanks in advance (and excuse me if my post is not usual, it is my first one on StackExchange/Overflow).
edit Yes I will add the code i am using next time, it’s so obvious ! Thanks a lot for your help