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.
Prerequisites
Section titled “Prerequisites”- 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.
Starter-kit path
Section titled “Starter-kit path”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.
- 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. - 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. - Open a page. Create or edit a Page. The SEK editor replaces the
default editor here because
pageis a configured post type on this theme (viaconfig/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.
Plugin-only path
Section titled “Plugin-only path”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.
-
Activate the SEK plugin as above.
-
Add a
.sek.ymlto 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 configssections: blocks # directory of section configs + templatesThe 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.ymlreference for every key. -
Create the directories. Make the
sectionsandpostTypesdirectories you just declared. They start empty. -
Author at least one section. A section is a
blocks/<handle>.yamlconfig paired with ablocks/<handle>.phptemplate (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, itssekCLI 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 inapp/filters.php. Without it, every section the plugin renders (in live preview and throughsek_render_sections()) comes out as an error box. See Classic PHP vs Blade. -
Configure a post type. Add a config file under your
postTypesdirectory naming which sections that post type may use. SEK falls back tomain.yamlfor thepagepost type when no more specific config exists.config/post-types/main.yaml preview: truefields:- label: Page Sectionshandle: contenttype: sectionssections:- 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.