I want to create (or update) a meta for unix timestamp relevant to start and end custom meta fields. For the same, I created this event which should run when a post is created, updated or published after it was drafted by a user.
The problem is, the save_post is not firing (I assume). Any thoughts?
Twitter – Vajrasar
I had a similar thing I needed to do where I needed post B to have a custom field with meta from post A. To set it up correctly, I had one function which was hooked to both save_post and publish_post. I forget the full reasoning behind it but my research determined that they are two separate events, and to make sure I was covered whether the post was being saved, updated, or published, I needed both. My code is here if it helps you at all.
Also if you are using the Custom Metabox/Field plugin, those are usually prefixed with an underscore, eg. _cmb_from_textdate_unix, so if you have underscores in one place but not the other, that may be part of the issue. HTH
I do the best I can with what I’ve got. (say hey on twitter)
You must be logged in to reply to this topic.
Are you a blogger, web designer, developer, or website owner looking to generate more income?
Promote products for the largest and fastest growing online website platform as part of our affiliate program.