Support » Requests and Feedback » Error in Block Editor Handbook?

  • Hi, is this the place to report possible errors in the WordPress.org documentation?

    In the tutorial for creating a metabox in a sidebar the metabox is registered with this code:

    register_post_meta( 'post', 'sidebar_plugin_meta_block_field', array(
        'show_in_rest' => true,
        'single' => true,
        'type' => 'string',
    ) );

    This would not work for me until I changed ‘post’ to ‘page’.

    Is this an error or is my code just wonky?

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    Umm, no, post would be correct if you wanted to add a meta box to Posts. If you want to add it to Pages, then you would use page, obviously.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.