Forums

Custom post type meta disappearing randomly (3 posts)

  1. jessn
    Member
    Posted 1 year ago #

    I'm encountering a very strange problem with a custom post type I've set up. Sometimes, but not always, when a new post is created or another edited, one post in particular loses all meta data. Just that one post. And it's not all the time, it seems to be almost random. I can't for the life of me think of what could be causing it, and I'm hoping someone else has seen this issue before and can point me in the right direction.

    Thanks!

  2. jessn
    Member
    Posted 1 year ago #

    Well I found something online that suggested changing this line:

    add_action('save_post', 'save_details');

    To this;

    add_action('post_updated', 'save_details', 10, 1);

    I'm going to try it and hope it works

  3. jimmyprydz
    Member
    Posted 1 year ago #

    Hi jessn!
    How did that fix work out for you? Having about the same problem here with losing information randomly.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.