

The documentation for the block editor is still kind of all over the place but there is some decent information in the “Block Editor Handbook”. We’re going to go over what it takes to go from nothing to a relatively basic, custom Gutenberg block. React is on my mind, and given that the WordPress editor is also written in React, I thought it would be a good idea to see what it would take to create a custom block. I’ve been working with React full-time for the past year, rebuilding WP Migrate DB Pro’s frontend. These days, custom blocks are where it’s at. The base set of default blocks is pretty robust, but what if you wanted to create your own custom block for laying out content? In the past you would use something like Advanced Custom Fields (ACF) or shortcodes. It marks WordPress’ move into the page builder space. The theme will be released with WordPress 5.9 and follow the key dates / milestones associated with its development schedule.The WordPress block editor (previously titled Gutenberg) includes a new way to add content to your WordPress posts, pages and soon all content on your WordPress site. After the theme is stable, the site will be switched to automatic updates from the repo.

During the theme development process, updates to trunk will be brought onto the demo server within five minutes. Global Styles & theme.json documentation.composer run standards:fix attempts to automatically fix errors.composer run standards:check checks PHP for standards errors according to WordPress coding standards.composer run lint checks PHP for syntax errors.composer run analyze statically analyzes PHP for bugs.npm run lint:css lints and autofixes where possible the CSS.The following test commands are then available: You can install the test-specific development dependencies by running npm i & composer install. To optionally run tests locally, you will also need: Some theme features / PRs may require Gutenberg trunk and will be described or tagged accordingly. If you've helped contribute to the theme in any way, you deserve credit! Folks will be updating CONTRIBUTORS.md periodically with names of contributors, but feel free to open a PR or issue if we leave someone out.In accordance to those last two bullets, this theme has no required build process.Twenty Twenty-Two will be the first widely-distributed block theme, so let's keep its code simple. Similarly, let's refrain from building any custom-built PHP or JavaScript-based workarounds for functionality that might reasonably be provided by the Block Editor.Let's include clear code comments for any CSS we do include. As a general rule, if multiple themes would benefit from the CSS you're considering adding, it might reasonably be provided by Gutenberg instead. Much of the theme's visual treatments should be handled by the Block Editor and Global Styles. As stated above, a goal for the theme is to have as little CSS as possible.Clone / download this repository into your /wp-content/themes/ directory.Set up a WordPress instance, we recommend wp-env or Local as an alternative to docker.We'll help you get set up with the ability to add labels to issues and PRs. If you'd like to help with triage, let and know here or in 's Slack instance. Please look through open issues, and join in wherever you feel most comfortable. Pull requests are preferred when linked to an existing issue.Ĭontributing is not just for developers! There are many opportunities to help with testing, triage, discussion, design, building patterns and templates, and more. If you would like to contribute code, the list of open issues is a great place to start looking for tasks. The theme development team will work closely with Gutenberg contributors to build design tools in the block editor that enable this goal. The theme aims to ship with as little CSS as possible: our goal is for all theme styles to be configured through theme.json and editable through Global Styles. It's built for full site editing first as a block theme. Twenty Twenty-Two is designed to be the most flexible default theme ever created for WordPress. Welcome to the development repository for the default theme that will launch with WordPress 5.9. Please report all new bugs of reature requests on Trac.

This theme has been merged into the WordPress Core SVN repository, and is no longer maintained on GitHub.
