Viewing 4 replies - 1 through 4 (of 4 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    What do you want the PHP code to do when you add a new post?

    Thread Starter gautier

    (@gautier)

    I would like to create an entry in my wordpress database.

    Thread Starter gautier

    (@gautier)

    And I’ve the meta field adress in post and I would like to convert it in lat long and send it to the database.

    Moderator bcworkz

    (@bcworkz)

    There are probably a number of actions or filters that you could hook your code into. One is the action ‘save_post’. Your code will be passed the post ID. You’ll need to check if the post author is an admin. The meta will have already been inserted as originally input by the user. You would retrieve it, verify it has not been changed, and if not, change it and update the meta.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Action when I add post.’ is closed to new replies.