• chetansoul1993

    (@chetansoul1993)


    Hello Everyone,

    Upon Saving a Post in back-end with save_post hook, few custom meta information getting deleted from the database as well as in the back-end. Please suggest what I can do here.

    Thanks in Advance

    • This topic was modified 3 years ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Everything else WordPress topic

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    Hard to say without seeing the code involved. It may be that on updates, the meta fields in submitted data are empty, thus overwriting existing meta with empty strings.

    Generally speaking, the save_post hook and related post meta don’t play well together. IMO you may be better off saving post meta separately, independent of save_post.

    If you decide to share the code that’s involved, if it’s more than a brief snippet, please post it off-forum somewhere like pastebin.com and just provide the link here.

Viewing 1 replies (of 1 total)
  • The topic ‘Save_post hook Delete Custom meta’ is closed to new replies.