Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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

1 Answer 1

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

 
discard

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.