Previewing MetaBoxes

Support General Previewing MetaBoxes

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #3627
    FEDFED
    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.

    #3631
    Anh TranAnh 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
    FEDFED
    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 TranAnh 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 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Previewing MetaBoxes’ is closed to new replies.