Forums

How do I prevent a post type from updating it's meta data? (1 post)

  1. webbtj
    Member
    Posted 1 year ago #

    I really need some help on what, I'm sure for a wordpress guru, is a fairly situation. The log and short of it is, I have a plugin that updates some meta data for a page/post/custom post type. The plugin functions in a separate ajax pop-up. So the plugin allows the user to make the change to these specific meta data fields and saves them to the db, no problem.

    Here's the problem, because the meta data is also already loaded into hidden fields in the regular page/post editor and not reloaded, when the user hits update (after already making changes via the plugin's pop-up interface) the recently made changes are over written with the original data.

    I'm looking at three possible solutions:
    1. Reload the page after saving via the ajax pop-up - This would be very bad as any content changes that were being made but had not been committed would be lost.
    2. Muck around with the javascript of the plugin and have it dynamically update the hidden variables - May be a viable solution but seems like it might be a lot of time spent "hunting" where I did not write the plugin in question.
    3. I'm hoping there is some what to prevent certain meta fields from being updated when a page/post/custom post type is saved. It may even be something fairly basic, I'm only about a month into my WordPress career so it may be something simple I over looked.

    I would really appreciate any kind of input!

    Thanks,
    -TJ

Topic Closed

This topic has been closed to new replies.

About this Topic