Block Editor Custom Alignments #9 in Blocks & Editor
Allows developers to add custom alignments to `theme.json` for use in the WordPress block editor.
by Modern Tribe · github.com/moderntribe/block-editor-custom-alignments · website
Install
The author publishes release zips, so WP-CLI can install straight from GitHub:
wp plugin install https://github.com/moderntribe/block-editor-custom-alignments/releases/download/v1.1.3/block-editor-custom-alignments.1.1.3.zipReadme
Block Editor Custom Alignments
Allows developers to add custom alignments to theme.json for use in the block editor.
Usage
The plugin runs off of an _experimentalLayout attribute in theme.json that allows a developer to define extra alignments (widths) for blocks that support alignment. If a block doesn't support alignment, this feature will not display. All values within the _experimentalLayout array's objects are required. Excluding this array from your theme.json file will disable most features of the plugin.
"_experimentalLayout": [
{
"name": "Narrow",
"slug": "narrow",
"icon": "M5 9v6h14V9H5zm11-4.8H8v1.5h8V4.2zM8 19.8h8v-1.5H8v1.5z",
"width": "400px",
"textdomain": "tribe"
},
{
"name": "Extra Wide",
"slug": "extrawide",
"icon": "M5 9v6h14V9H5zm11-4.8H8v1.5h8V4.2zM8 19.8h8v-1.5H8v1.5z",
"width": "1300px",
"textdomain": "tribe"
}
],
You are still able to define contentSize and wideSize within the layout attribute as normal, and they will populate in the new control created by the plugin. You can find the documentation for layout from core here.
"layout": {
"contentSize": "652px",
"wideSize": "883px"
},
Includes Array
The plugin also offers support for only include specific blocks from having custom alignment support via the _experimentalLayoutInclude array within theme.json.
"_experimentalLayoutInclude": [
"core/group",
"core/columns"
],
Excludes Array
The plugin also offers support for excluding specific blocks from having custom alignment support via the _experimentalLayoutExclude array within theme.json.
"_experimentalLayoutExclude": [
"core/group",
"core/columns"
],
Sorting Flag
The plugin offers a way to turn on a sorting feature. If the _experimentalLayoutSorting attribute is added to theme.json and set to true, the plugin will sort the final alignment controls array by the widths provided. With controls that do not have a defined width, appearing at the bottom of the list.
"_experimentalLayoutSorting": true,
- Sorting Enabled: http://p.tri.be/i/ddH3a6
- Sorting Disabled: http://p.tri.be/i/zzYW0W
Local Development
Since this is a small plugin, local development uses mostly Wordpress default build scripts via wp-scripts, with some overrides.
To get started:
- Clone the plugin / download the repo ZIP into your
pluginsfolder within Wordpress. cd block-editor-custom-alignmentscomposer installnvm usenpm installnpm run devornpm run dist
The plugin also offers scripts for linting and formatting:
npm run lintwill run formatting and linting on all PCSS & JS files.npm run formatwill runwp-scripts formaton all PCSS & JS files.- Linting is also available per language via their own respective commands:
npm run lint:csswill return linting errors in your PCSS files.npm run lint:css:fixwill fix linting errors in your PCSS files.npm run lint:jswill return linting errors in your JS files.npm run lint:js:fixwill fix linting errors in your JS files.
Modern Tribe
Read the full README on GitHub →
Releases
| Tag | Published | Asset | Downloads |
|---|---|---|---|
| v1.1.3 | Apr 9, 2026 | block-editor-custom-alignments.1.1.3.zip | 130 |
| v1.1.1 | Jul 16, 2025 | block-editor-custom-alignments.1.1.1.zip | 717 |
| v1.1.0 | Jul 15, 2025 | block-editor-custom-alignments.1.1.0.zip | 3 |
| v1.0.9 | Jul 15, 2025 | block-editor-custom-alignments.1.0.8.zip | 2 |
| v1.0.8 | Aug 7, 2024 | block-editor-custom-alignments.1.0.8.zip | 4,802 |
| v1.0.7 | May 2, 2024 | block-editor-custom-alignments.1.0.7.zip | 180 |
| v1.0.6 | Jul 19, 2023 | block-editor-custom-alignments.1.0.6.zip | 4,164 |
| v1.0.5 | Jun 6, 2023 | block-editor-custom-alignments.1.0.5.zip | 717 |
| v1.0.4 | Jun 1, 2023 | block-editor-custom-alignments.1.0.4.zip | 27 |
| v1.0.3 | May 16, 2023 | block-editor-custom-alignments.1.0.3.zip | 57 |
| v1.0.2 | May 11, 2023 | block-editor-custom-alignments.1.0.2.zip | 26 |
| v1.0.1 | May 9, 2023 | block-editor-custom-alignments.1.0.0.zip | 13 |
| v1.0.0 | May 3, 2023 | block-editor-custom-alignments.1.0.0.zip | 3 |
Active-site estimate ≈180 comes from the median of recent superseded releases. Method.
