Skip to content

Install

Section Editor Kit (SEK) has two moving parts you install into a WordPress site: the plugin, which loads config, stores values, and renders sections, and a theme that opts in to SEK by declaring where its section configs and post-type configs live. There are two ways to get both in place.

  • The starter-kit path gives you a theme that is already wired (section configs, templates, and post-type configs all present), so you can open a page and start editing in minutes. Choose this to learn SEK or to start a new site.
  • The plugin-only path adds SEK to a theme you already have. Choose this to bring SEK to an existing project.

Both paths end in the same place: the plugin active, a theme carrying a .sek.yml, and at least one post type configured with sections.

  • WordPress on PHP 8.2+.
  • A theme you control. SEK reads section and post-type configs from the active theme, so you need to be able to add files to it.
  • The SEK plugin build. The plugin ships with its editor assets already compiled into dist/: there is nothing to build to use it.

The starter kit is a theme that already contains everything SEK needs: a .sek.yml opt-in, a blocks/ directory of worked section configs and their templates, and a config/post-types/ directory that lists which sections each post type can use. starterkit-classic (plain PHP templates, no build step) is the lowest-friction example and the theme this documentation’s walkthroughs are validated against.

  1. Activate the SEK plugin. In wp-admin → Plugins, activate Section Editor Kit (free or premium download). Get the starter kit from the starter-kit page.
  2. Activate the starter-kit theme. In Appearance → Themes, activate the starter kit. Because it already ships a .sek.yml, SEK discovers its sections and post-type configs immediately.
  3. Open a page. Create or edit a Page. The SEK editor replaces the default editor here because page is a configured post type on this theme (via config/post-types/main.yaml, the starter kit’s catch-all), and the starter kit’s sections are available in the add-section picker.

That is the whole install for this path. To learn how the pieces fit together, continue to Your first section, which adds a brand-new section to this same theme.

Use this path to add SEK to a theme that already exists. You will create the same three things the starter kit ships (a .sek.yml, a sections directory, and a post-type config) by hand.

  1. Activate the SEK plugin as above.

  2. Add a .sek.yml to your theme root. This file is the opt-in: it tells SEK where, relative to the theme root, your section configs and post-type configs live.

    wp-content/themes/your-theme/.sek.yml
    postTypes: config/post-types # directory of post-type configs
    sections: blocks # directory of section configs + templates

    The two values are directories relative to the theme root. Point them wherever suits your theme: a Sage theme, for instance, commonly uses sections: resources/views/blocks. See the .sek.yml reference for every key.

  3. Create the directories. Make the sections and postTypes directories you just declared. They start empty.

  4. Author at least one section. A section is a blocks/<handle>.yaml config paired with a blocks/<handle>.php template (or a Blade template in a Sage theme). The Your first section walkthrough builds one from scratch. If you work from the SEK source repository, its sek CLI can scaffold the pair for you. The CLI is not part of the plugin: the downloaded plugin ZIP does not include it.

    SEK renders plain-PHP templates by default. A Sage/Acorn theme with Blade templates also opts in to Blade rendering with one filter, add_filter('sek/render_mode', fn () => 'sage');, usually in app/filters.php. Without it, every section the plugin renders (in live preview and through sek_render_sections()) comes out as an error box. See Classic PHP vs Blade.

  5. Configure a post type. Add a config file under your postTypes directory naming which sections that post type may use. SEK falls back to main.yaml for the page post type when no more specific config exists.

    config/post-types/main.yaml
    preview: true
    fields:
    - label: Page Sections
    handle: content
    type: sections
    sections:
    - your-section-handle

Once the plugin is active, the theme carries a .sek.yml, and a post type lists at least one section, editing works exactly as it does on the starter-kit path.

Continue to Your first section.