WordPress.org

Ready to get started?Download WordPress

Forums

Need help preventing certain postmeta from saving (1 post)

  1. webbtj
    Member
    Posted 3 years ago #

    I'm hoping someone can help me out here.

    I'm working on a site where each page needs to have an editable top banner image (with the ability to crop and resize). A former coworker wrote a slick plugin that has the core functionality, except that it was designed to create a custom post type (used to create rotating banners). I've adapted it to create a banner associated with a page, but here is my one little issue:

    The plugin itself saves the post meta data related to the banner, however this is all done via an ajax window. The problem is that once the user hits the regular "update" button everything is resaved including meta data. Since the page is not reloaded after the plugin has saved the meta data for the banner, the standard update is overwriting the meta data changed by the plugin. In other words, saving via the plugins save mechanism works fine, and if the page is manually reloaded afterwords the banner changes are kept as desired, however this is impractical as the user should not need to update the banner and the content separately.

    My question is: is there any way to prevent the update function of a page (or post or custom post type) from updating certain meta data?

    Thanks all!
    -TJ

Topic Closed

This topic has been closed to new replies.

About this Topic