Articles & Tutorials

Check out the latest articles about WordPress development tips and techniques.

How I edit WordPress sites with AI using MCP

Turn your WordPress site into an MCP server that AI tools like Claude and Cursor can interact with directly. Learn how to set it up using the Abilities API and MCP Adapter and I’ll share a handy abilities plugin you can use to get started.

Read More

How I made the Interactivity API finally click

I struggled with understanding the WordPress Interactivity API until I actually built something with it. I build a dark mode toggle block that made the whole thing click for me. I’ll show you how to build one and how using semantic colors makes dark-mode styling a breeze.

Read More

How to set default block styles in a block theme

In this post I’ll walk you through how to style blocks using the Site Editor’s Global Styles interface, how to use “Additional CSS” for more advanced customizations (like hover states and targeting descendant elements), and how to persist everything back to your theme files using Create Block Theme.

Read More

Building a Custom Block Part 6: Block Variations

In Part 6 of Building a Custom Block, we’ll use the Block Variations API to create preconfigured versions of our Notice block. Instead of inserting a generic notice and then picking a style, users will be able to drop in a ready-to-go “Error Notice” or “Success Notice” directly from the block inserter.

Read More

How to set up @wordpress/scripts

The @wordpress/scripts package makes it easy to bundle your JavaScript for a plugin or theme and is especially helpful when developing custom blocks. In this post, I’ll show you how you can easily set up @wordpress/scripts and take advantage of the dependency management benefits it offers.

Read More

How to add a gradient text effect to specific words in a block

Gradient text effects are pretty nifty and can add a nice element of visual flair to your posts (if I do say so myself). Adding this effect is pretty easy with CSS, but what if you want to only apply it to certain words inside a paragraph, heading, or similar block? In this post I’ll…

Read More

4 new essential modern CSS features for WordPress Development

CSS has been around for a while, but modern features are being added faster than ever. In this post, I’ll show you 4 essential CSS capabilities: color manipulation, smart selectors, container queries, and aspect-ratio that will save you time and effort on your WordPress projects, with no JavaScript or complex workarounds required.

Read More

How to easily parse and alter HTML markup with WP_HTML_Tag_Processor

When you’re building with WordPress you will almost definitely need to modify HTML output at some point or other. This type of thing is pretty easy to do with JavaScript (which is pre-built with tools for manipulating the DOM) but historically it’s been much more challenging when using PHP. In this post I’ll show you…

Read More

How to get a list of posts in the block editor

If you’re building a custom block that renders a list of posts, you’ll need a way to get those posts! I’ll cover the pros and cons of each so you can choose the right approach for your situation when it comes up.

Read More

How to easily register all blocks in your theme/plugin

If you’re making a theme or plugin that has multiple custom blocks in it, manually registering each one can definitely feel cumbersome. In this post I’ll show you a simple way to easily register all your blocks according to modern best practices.

Read More

Add Custom CSS Variables in theme.json

If you’ve worked with the block or site editor you’ve probably noticed that WordPress generates CSS variables based on what you enter in theme.json. This includes things like your color palette, spacing values, font sizes, font families, and more. In this post I’ll show you how you can add your own custom CSS variable definitions…

Read More

How to build custom blocks in your WordPress theme

If you’re just getting into block development, deciding where to build your custom blocks can be confusing. Much of the documentation from wordpress.org suggests using a plugin, but in the past you probably stored reusable components directly in your theme. In this blog post, I’ll break down why you probably want to store your custom

Read More

How to easily set up Webpack for a WordPress theme with 10up-toolkit

In a modern WordPress theme (or any frontend project) one of your first steps is setting up tooling. There are numerous tools to use, but if you’ve done this before you probably have used (or heard of) Webpack. If you haven’t, I’ll explain below. In this article, I’ll show you how you can easily leverage

Read More

Add autocomplete to your theme.json file

The functionality of theme.json has been constantly expanding since the feature was introduced in WordPress version 5.8. This means there are always new things being added, but that also means there’s a whole lot to remember! In this post, we’ll talk about a one-line solution to add autocomplete and hinting to your WordPress theme’s theme.json

Read More

Next