Custom Fields
Re-Envisioned
Support General Previewing MetaBoxes

  • Creator
    Topic
  • #3627
    FED
    Participant

    Is it possible to preview updates to MetaBox fields before saving?

    This works while a post is in Draft state, but once a post is published the MetaBox is no longer previewed without clicking 'Update', which means the changes are published.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Author
    Replies
  • #3631
    Anh Tran
    Keymaster

    The meta values are saved when you save the post as a draft. So they should be visible in the front end. How did you check that?

    #3654
    FED
    Participant

    "Save Draft" is no longer an option once a page has been published. Published pages can either be previewed or updated. Currently, if you update a MetaBox on a published page and click "Preview" the changes do not appear in the preview.

    #3655
    Anh Tran
    Keymaster

    If you’re editing a published page and then click Preview then you can’t see the meta values unless you set “autosave” true for the meta box.

    The thing here is WordPress auto saves post title and post content so you can preview them while edit (there must be a “save” action so you actually see the changes) and by default, Meta Box turns the autosave = off so you don’t see it. Setting “autosave” true fixes the problem.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Previewing MetaBoxes’ is closed to new replies.