Using ACF fields as post title
-
Hello everyone, I’m asing you if anyone knows how I can solve this issue, I found some answers in the web but no-one worked for me.
I’m using custom fields (via ACF plugin) in a custom post type. I’d like that when I create a new post with custom fields filled with proper values, the post title is automatically set depending on the custom fields velues.
I.E. If I have a field called “description” and another called “year”, when I click on “publish”, its title should be automatically set to something like “description – year”.
I tried a few suggestions I found on the web but the title remains blank (maybe the custom fields are not yet saved into db when I click on publish the post and run the function that set title?).
Anyone knows hoy to fix this, or knows what is the correct hook I have to use to get this problem solved?Note: It should be nice that the title is set only the first time a post is created, but if this is not possible, I can accept that title is updated every time I update the post.
Thanks in advance for your suggestons
- The topic ‘Using ACF fields as post title’ is closed to new replies.