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

Tag: javascript

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 […]

Making Autocomplete Search in WordPress With Code

This tutorial is for you who want to implement an autocomplete search in WordPress, where we are in full control of the returned matches. We will apply an autocomplete to the standard WordPress search, but the code highly flexible so you can customize the query to your needs. Whether it is a more specific query […]

Implementing an Animated Filtering of Posts by Category

Ever wanted to make a nice column-presentation of posts with category filters above that shuffles and filters the posts with an nice animation? Then this is the tutorial for you. What we will make in this tutorial is a list of all posts (preferably within a custom post type such as employees) nicely in columns […]

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 […]

Posts navigation

1 2 3 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)