WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was wondering what hook i would use to geo-locate a custom post type when it is saved?

I have a Custom post type of Restaurant and I want to geolocate the address using googles api and then save it into another field(s)

share|improve this question
up vote 0 down vote accepted

On post save the 'save_post' action is run. You could hook your function that geolocates to that.

share|improve this answer
That was it thanks! – justinhilles Jun 27 '12 at 16:35
github.com/fyaconiello/wp-geo-posts has all of the code for adding the metaboxes for location and the post_save implementation. – Francis Yaconiello Aug 5 '12 at 17:41

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.