Skip to content
  • The Block Developer Cookbook

  • Recipes
  • Conferences
Log in
  • Preset block bindings with variations

    Ingredients: block bindings, prep work, variations

    Skill Level:

    ⏲️ 5 minutes

    In this recipe, we’ll whip up a block variation that presets block binding to streamline workflows and save time for you and your clients. Just like prepping ingredients in advance speeds up cooking, block variations help you preset and reuse and block bindings effortlessly. Let’s get cooking! 🍳🔧

  • Binding the excerpt to a block

    Ingredients: block bindings, data layer, dynamic block, extending core blocks, variations

    Skill Level:

    ⏲️ 10 minutes

    In this recipe, we’ll craft a custom block binding source to connect a block variation to the post excerpt—think of it as pairing the perfect sauce with your dish. Just like a great chef knows how to balance flavors, you’ll learn how to bind dynamic data to your blocks for a seamless editing experience. Grab your utensils, and let’s get binding! 🔗👨‍🍳

  • Custom Image block style

    Ingredients: extending core blocks, styles

    Skill Level:

    ⏲️ 10 minutes

    In this recipe, we’re going to register a custom block style to make our images look like they are taped to the screen!

  • Command Palette Commands

    Ingredients: command palette, custom fields, data layer, prep work

    Skill Level:

    ⏲️ 10 minutes

    In this recipe, we’re exploring the Command Palette API introduced in WordPress 6.3 to cook up handy shortcuts for common tasks. Just like a chef keeps their favorite tools within arm’s reach, you’ll learn how to streamline your workflow by making powerful commands only a few keystrokes away. Let’s sharpen our knives and get slicing through tasks faster than ever! 🔪⚡👨‍🍳

  • Editorial Notes

    Ingredients: build process, extending core blocks, hooks, styles, webpack

    Skill Level:

    ⏲️ 15 minutes

    In this recipe, we’re using block filters to sprinkle in a custom attribute and controls that let editors add notes to any block. We’ll also add a dash of custom CSS in the Block Editor to visually highlight blocks with notes—making them easy to spot in the mix. It’s a handy trick to keep your content organized and your workflow seasoned to perfection! 📝✨👨‍🍳

  • Block Deprecations

    Ingredients: deprecations, prep work

    Skill Level:

    ⏲️ 15 minutes

    In this recipe, we’ll cook up a tasty recipe block and walk through the process of updating it with block deprecations—the secret ingredient to keeping your blocks fresh while maintaining compatibility with older content. Just like a good chef tweaks recipes over time, developers need to refine their blocks without breaking past creations. So, grab your apron, fire up the editor, and let’s get cooking with block deprecations! 🍽️👨‍🍳

  • Managing team members

    Ingredients: block templates, build process, celebrity chef, custom fields, slotfill

    Skill Level:

    ⏲️ 15 minutes

    In this tutorial, we’ll cook up a custom post type with custom fields and its own block theme templates! Just like a signature dish needs the perfect presentation, your post type will come with tailored templates that integrate seamlessly with any active block theme. Follow along as we mix the right ingredients to create a fully customized content experience! 🍽️📜👨‍🍳

  • Block Transforms

    Ingredients: block transforms, prep work

    Skill Level:

    ⏲️ 15 minutes

    In this recipe, you’ll get hands-on with the Block Transforms API, learning how to control block conversions like a pro. You’ll see how to convert your custom block into others, transform existing blocks into yours, and even insert your block via text—making content editing more seamless than ever. Let’s dive in and start experimenting! 🔄👨‍🍳

  • Creating Custom Social Icons

    Ingredients: celebrity chef, extending core blocks, styles, variations

    Skill Level:

    ⏲️ 15 minutes

    In this recipe, we’re serving up custom social services and icons to use with the Social Icons block. You’ll learn how to register your own services, pair them with unique icons, and make your social links stand out like a perfectly plated dish. Let’s add some extra flavor to your footer and sidebars! 🌐🍴👨‍🍳

  • Converting to a Dynamic Block

    Ingredients: dynamic block, prep work, static blocks

    Skill Level:

    ⏲️ 15 minutes

    In this recipe, we’re taking a static block and transforming it into a dynamic block. You’ll learn how to move the logic from the editor into PHP, letting your block serve up fresh content every time it’s rendered—like switching from a prepackaged meal to something cooked to order. Let’s fire up the stove and get dynamic! 🔥👨‍🍳

  • Word Counter

    Ingredients: build process, data layer, state

    Skill Level:

    ⏲️ 20 minutes

    In this recipe, we’re cooking up a word count tool that scans all the blocks on a page, tallies up the words, and—if there aren’t enough—locks the post from being saved or published. It’s like a kitchen timer for your content, making sure every dish meets the minimum serving size before it leaves the kitchen! ⏱️📋👨‍🍳

  • Customize the build process

    Ingredients: build process, webpack

    Skill Level:

    ⏲️ 20 minutes

    In this recipe, we’re customizing the @wordpress/scripts build process to bundle a plugin with a single custom block, a JavaScript file that registers a block variation, and a CSS file to style it. We’ll keep things neat by organizing the block code in a blocks directory and the JS/CSS in a resources directory—a clean and tasty setup for your project! 🗂️✨👨‍🍳

  • Simple Fade-in Effect

    Ingredients: extending core blocks, front end JS, wp_html_tag_processor

    Skill Level:

    ⏲️ 20 minutes

    In this recipe, we’re adding a little flair by loading custom JavaScript and CSS for the Cover and Image blocks to create a smooth fade-in effect as they scroll into view. To keep things efficient, we’ll only enqueue these files when the blocks are actually on the page—no extra garnish unless it’s needed! ✨🖼️👨‍🍳

  • Creating a custom format

    Ingredients: build process, format api, state

    Skill Level:

    ⏲️ 20 minutes

    In this recipe, you’ll use the Format API to create a custom format for acronyms to be able to show the full meaning inline. This will require customizing the build process and adding a sprinkle of front-end CSS.

  • man standing in front of bowl and looking towards left

    Meme Generator

    Ingredients: block controls, block supports, fonts, react hooks, third-party data

    Skill Level:

    ⏲️ 25 minutes

    In this recipe, we’re whipping up a meme generator block that’s sure to spice up your WordPress site! You’ll learn how to connect to a third-party meme API, let users add their own text, and even register custom fonts to give their creations that perfect punchline. It’s a flavorful mix of fun, functionality, and font finesse—so grab your spatula, and let’s get silly in the editor! 🧂😎🖼️

  • Post Meta Testimonial Block

    Ingredients: block context, data layer, dynamic block, hooks

    Skill Level:

    ⏲️ 25 minutes

    In this recipe, you will create a Testimonial block that will store the testimonial in custom post meta and save the Author Name to a block attribute. It uses a single attribute to store the name of the testimonial author while the actual testimonial content will be stored in post meta.

  • A dark/light mode toggle

    Ingredients: data layer, hooks, interactivity api, state

    Skill Level:

    ⏲️ 30 minutes

    In this recipe you’ll cook up a custom block that toggles dark and light mode! Using the Interactivity API, this block lets users switch color schemes effortlessly, with their preference saved to user meta if they’re logged in or a cookie if they’re not—just like remembering their favorite dish. Ready to serve up a better user experience? Let’s get cooking! 🌗👨‍🍳

  • Interactive API Gallery Slider

    Ingredients: build process, dynamic block, interactivity api, state, wp_html_tag_processor

    Skill Level:

    ⏲️ 35 minutes

    In this recipe, we’re going to create a custom gallery slider block that is powered by the Interactivity API (IAPI). This slider will use the core blocks as slides and we’ll filter these core blocks to allow them to support the IAPI. Finally, we’ll add an attribute to the block and use it inside the store that powers the slider.

Proudly powered by WordPress and the Interactivity API. Images courtesy of Pexels.com

  • Twitch
  • YouTube
  • GitHub