save_post won't work

Community Forums Forums General Discussion save_post won't work

This topic is: resolved

Tagged: ,

This topic contains 1 reply, has 2 voices, and was last updated by  Robin 1 year, 9 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #87794


    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?

    I make WordPress websites using Genesis Framework.

    WordPress/Genesis Development | Customizations



    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)

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.