WordPress block theme development: field notes

I’m attempting to write a WordPress (WP) theme. It seems that the Gutenberg block system is here to stay (see the release notes for WP 5.9), so my theme, which was going to be what is now called a classic theme, is going to be a block theme.

Block themes are new, so I don’t know how to do them; naturally, I looked on the internet for documentation. However, the documentation that is there is either out-of-date (referring to WP 5.8 and/or the Gutenberg plugin) or completely useless.

I started following WP’s guide to set up a development environment, but it seemed inanely complicated, requiring Node and NPM, Docker. I couldn’t understand why I needed all these things or why it made so much fuss about having NVM, so, after creating a free account at Docker, I gave up and set up Apache, MySQL and PHP locally, which works perfectly well. I already have Node and NPM installed, so that shouldn’t be a problem (🤞).

I’m going to document the things I find out here; field notes on blocks, if you will, which I hope will be more useful than WP’s own field guide.

Site Editor

I’ve just realised something about WordPress block styling, and it’s not good

I realise that semantic classes are not compatible with the Site Editor’s settings.

0 comments

Adding a navigation menu to a WordPress block theme

I work out how to register menu locations for themes, which seems pointless, actually.

0 comments

WordPress block settings: I’ve found them

I finally find some answers to my block markup questions.

0 comments

Blocks

Panda-Puss base theme change

I change the type of my Panda-Puss theme from a traditional one to a new-fangled block theme.

0 comments

WordPress block template documention

I look for documentation to help with creating my WordPress block theme Panda-Puss.

0 comments

There’s a Sublime Text package to auto-complete WordPress blocks

I have an idea for helping with WordPress block templates: an auto-completion package for Sublime Text.

0 comments

WordPress block template markup: types of tag

There are two types of WordPress block template markup, just as there are two types of HTML tags. I explain.

0 comments

Adding your own classes to WordPress blocks

I find out how to add classes to WordPress blocks without breaking the WordPress editor.

0 comments

WordPress navigation blocks

I discover how to add a navigation block to a WordPress block theme. I note some of the markup that can be used with such blocks.

2 comments

WordPress block parts

I talk briefly about WordPress block theme parts and compare them to the classic theme equivalent.

0 comments

I’ve just realised something about WordPress block styling, and it’s not good

I realise that semantic classes are not compatible with the Site Editor’s settings.

0 comments

WordPress search block and search results

The lack of conditional logic in HTML files is causing problems. This problem doesn’t exist with PHP files.

0 comments

Adding a navigation menu to a WordPress block theme

I work out how to register menu locations for themes, which seems pointless, actually.

0 comments

WordPress block settings: I’ve found them

I finally find some answers to my block markup questions.

0 comments

WordPress search block and search results: improved

WordPress 6.0 improves the behaviour when no results are found.

0 comments

Patterns

Patterns were originally called block patterns; not all WP themes and documentation on the internet have been updated.

WordPress search block and search results: improved

WordPress 6.0 improves the behaviour when no results are found.

0 comments

Templates

Templates were originally called block templates; not all WP themes and documentation on the internet have been updated.

WordPress block template documention

I look for documentation to help with creating my WordPress block theme Panda-Puss.

0 comments

There’s a Sublime Text package to auto-complete WordPress blocks

I have an idea for helping with WordPress block templates: an auto-completion package for Sublime Text.

0 comments

WordPress block template markup: types of tag

There are two types of WordPress block template markup, just as there are two types of HTML tags. I explain.

0 comments

Adding your own classes to WordPress blocks

I find out how to add classes to WordPress blocks without breaking the WordPress editor.

0 comments

WordPress navigation blocks

I discover how to add a navigation block to a WordPress block theme. I note some of the markup that can be used with such blocks.

2 comments

WordPress block parts

I talk briefly about WordPress block theme parts and compare them to the classic theme equivalent.

0 comments

WordPress search block and search results

The lack of conditional logic in HTML files is causing problems. This problem doesn’t exist with PHP files.

0 comments

WordPress search block and search results: improved

WordPress 6.0 improves the behaviour when no results are found.

0 comments

Parts

Parts were originally called template parts; not all WP themes and documentation on the internet have been updated.

WordPress block parts

I talk briefly about WordPress block theme parts and compare them to the classic theme equivalent.

0 comments

Adding a navigation menu to a WordPress block theme

I work out how to register menu locations for themes, which seems pointless, actually.

0 comments

WordPress search block and search results: improved

WordPress 6.0 improves the behaviour when no results are found.

0 comments