Skip to main content
A White Pixel
  • WordPress Gutenberg Developer’s Guide
  • Latest Posts
    • WordPress
    • Gutenberg
    • Themes
    • WooCommerce
    • Gravity Forms
    • Advanced Custom Fields

Category: Gutenberg

How to Translate custom Gutenberg Blocks with block.json

In the previous post I wrote a guide in how to create custom Gutenberg blocks with block.json. As a follow-up, this is a guide in how to handle translation of your block using this method. With older methods we would use wp_set_script_translations() in order to set translated strings to a block – as detailed in […]

Creating Custom Gutenberg Blocks with block.json

Following the updated norms in WordPress Gutenberg, custom blocks should now be registered using a block.json file. In this guide we’ll go into details on how to go about this. Updated method of registering blocks Since WordPress version 5.8 using the block.json metadata file has been the canonical way to register custom blocks. There are […]

Gutenberg: Updating withSelect and withDispatch into React Hooks (useSelect and useDispatch)

This post is a quick introduction into a way to keep your your Gutenberg code up to current standards by using React hooks. We’ll see how this is beneficial, why we should do it, and how. Huh, hooks? I assume you already have some experience working with a bit more complex Gutenberg blocks or plugins […]

How to Add Post Meta Fields to Gutenberg Document Sidebar

In this post we’ll look at how to add custom post meta settings to the Gutenberg sidebar, in “Document” tab, rather than relying on adding meta boxes the traditional (and quite honestly much more manual) way. If you’ve worked with WordPress a while before Gutenberg was a thing, you’re probably familiar with adding custom post […]

In-Depth Guide in Creating and Fetching Custom WP REST API Endpoints

This post will show how to create custom WordPress REST endpoints and different methods for performing requests to them. There will be examples in both PHP, jQuery and vanilla Javascript. I assume you are already familiar with what WP REST API is, but here is a short summary. WordPress REST API is a JSON interface […]

How to Deprecate Gutenberg Blocks

One of the most common issues with updating a theme or plugin with Gutenberg blocks is that making changes to the block code will break all existing posts using that block. Luckily WordPress offers a solution; a way to deprecate blocks. In this post we’ll look at how to do this. If you’ve worked with […]

Create and Fetch Custom REST Endpoints in Gutenberg Blocks

In this post I’ll attempt to create an overview of how to create custom REST API endpoints and perform requests for them in a custom Gutenberg block. That is, making requests with fetch methods for information not available in WordPress’ registered data stores. A friendly reminder: most basic information are already available in WordPress’ data […]

Tutorial: Create a Slider as a Dynamic Gutenberg Block

This tutorial will go through how to create a dynamic WordPress Gutenberg block. The end result is a slider showing featured image from selected category posts. The code includes using a higher-order-component (withSelect) to fetch all categories within the block editor. What we will make The block will render a simple slider using the jQuery […]

Gutenberg Block Patterns: A Developer’s Look

A look into WordPress Gutenberg’s new block patterns, in the eyes of a developer. We’ll look into what they are, what they can be used for, and a deeper look into how to write code for them. Block patterns and their use Block patterns were introduced in WordPress 5.5 (August 11th, 2020). They are a […]

Add Custom Settings to Existing WordPress Gutenberg Blocks

Ever found yourself in the situation where you want to add your custom settings to WordPress’ Gutenberg blocks? In this post we’ll go into detail in how to do that. You’ll find two example code of real-life use-cases of adding custom settings to WordPress’ blocks. Keep in mind that because Gutenberg blocks are Javascript, modifying […]

Posts navigation

1 2 3 4 Next »

Categories

  • Advanced Custom Fields (7)
  • Gravity Forms (5)
  • Gutenberg (31)
  • Mini Tips (3)
  • Themes (30)
  • WooCommerce (9)
  • WordPress (37)

Newest Posts

  • How to Translate custom Gutenberg Blocks with block.json
  • Creating Custom Gutenberg Blocks with block.json
  • Gutenberg: Updating withSelect and withDispatch into React Hooks (useSelect and useDispatch)
  • How to Add Post Meta Fields to Gutenberg Document Sidebar
  • In-Depth Guide in Creating and Fetching Custom WP REST API Endpoints
  • How to Deprecate Gutenberg Blocks

Tags

admin (5) ajax (2) cpt (4) css (4) filters (10) hooks (12) i18n (3) javascript (28) media (1) menus (6) object-oriented (2) plugin customization (20) post query (5) rewrite url (3) scripts and styles (6) seo (3) theme (17) widgets (3) WP REST API (2)