Automatically generate post titles based on custom fields

Asked

Viewed 17 times

0

all right? I am creating a website, unde will be registered several units of this company, in several cities in Brazil. I created a post type called drive and among the custom fields I created using the plugin advancedcustomfields has a calling one-state where you will have a select with all the states, for your values I used the acronym of each state, and also created a custom field called oneness where a select will appear with all cities of each state, based on the state that the person selects above.

What I would like is for the post title to be automatically generated when you click publish, taking the name of the city and the value of the custom field, thus staying:

São Paulo - SP
Cuiabá - MT
Salvador - BA

And so on, I found a link, but my knowledge in PHP is very basic, I could not do.

inserir a descrição da imagem aqui

  • Put in the post the code used

  • @VME do you think you need? both custom post type and custom fields I created directly by the plugin interface

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.