Creating a Sidebar for Your Plugin Edit

This tutorial starts with you having an existing plugin setup and ready to add PHP and JavaScript code. Please, refer to Getting started with JavaScript tutorial for an introduction to WordPress plugins and how to use JavaScript to extend the block editor.

In the next sections, you’re going to create a custom sidebar for a plugin that contains a text control so the user can update a value that is stored in the post_meta table.

  1. Get a sidebar up and running
  2. Tweak the sidebar style and add controls
  3. Register a new meta field
  4. Initialize the input control with the meta field value
  5. Update the meta field value when input’s content changes