Skip to content

Create a Generic Control to edit post meta data #2

@bobbingwide

Description

@bobbingwide

In March, while developing the SB theme, for s.b/bigram I developed logic to deal with the _seen_before post meta field in the bigram plugin.

  • The _seen_before field is registered using bigram_register_post_meta which calls register_post_meta.
  • This is called from bigram_register_seen_before, in bigram_oik_fields_loaded which is the action hook for oik_fields_loaded.
  • The plugin provides the bigram/seen-before block that pretty much duplicates the logic documented in https://developer.wordpress.org/block-editor/how-to-guides/metabox/meta-block-3-add/
  • This code works.

When using the REST request http://s.b/bigram/wp-json/wp/v2/bigram the meta field is correctly populated.

In s.b/wordpress I'm using a different method to register the post meta fields. They don't show up in meta.
Why not?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions