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

Latest articles

How to Dynamically Populate Advanced Custom Fields Settings

With some PHP code it’s really easy to dynamically populate an Advanced Custom Fields (ACF) value or choices. You can do this for any kind of inputs, including the choices of radio, checkboxes and similar. In this post we’ll look at how. The filter Advanced Custom Fields offers a filter named acf/load_field. You can use […]

Add a Custom Inspector Sidebar in WordPress Gutenberg with Post Meta

In this tutorial we’ll look into how to add a custom sidebar to the Inspector (right sidebar) in WordPress Gutenberg. Inside we’ll implement a field connected to a post meta. Everything is implemented with Javascript, inside the Gutenberg editor, and is an alternative to adding metaboxes the traditional way. Heads up! This is a tutorial […]

Create Custom WooCommerce Product Tabs with Advanced Custom Fields

When viewing a product in WooCommerce information about the product is displayed in tabs. These tabs are fixed and generated by WooCommerce, outside your control. This post will show you how add code that allow the authors to add custom tabs with custom content to products. Disclaimer: There is a WooCommerce extension called WooCommerce Tab […]

How to Add Custom Settings to an Existing Widget in WordPress

In this post we’ll learn how to add your custom HTML and settings to any of WordPress’ standard widgets or others. Using those settings we’ll learn different tricks in how to manipulate the widgets behaviour accordingly. The first part; adding and saving your custom settings, is fairly easy. The second part depends on what specifically […]

How to Control Gutenberg Blocks For Posts in WordPress: Disable Blocks and Block Templates

WordPress’ new editor Gutenberg gives the author great flexibility to create rich content. But in some cases you might need to limit this a little, either as a site webmaster or as a theme developer. In this post we’ll look at how we can provide block limitations in Gutenberg using PHP. There are built-in functionality […]

How to Add an Image Select in Your Custom WordPress Gutenberg Block

This post is for you who’s creating a custom Gutenberg block and need a way to select or upload an image from the Media Library. Most other field types, such as checkboxes, text inputs, or colorpickers, are pretty easy to add but a Media uploader requires a bit more code. We will create a Inspector […]

How to Add Fontawesome Icons to Menu Items With Advanced Custom Fields

This post will show you how you can use Advanced Custom Fields (ACF) to allow adding icons to your menu. In this example we’ll add a Fontawesome icon, but you can modify the code to fit your needs. You could instead add a file picker for SVG files or something else. This guide will work […]

Create Custom Gutenberg Block – Part 10: Fetching Posts and Higher-Order Components

In this final part of the Gutenberg custom block tutorial series we’ll learn how to use higher-order components to utilize WordPress’ components for performing queries for posts and other core WordPress information. In the previous part we learned about dynamic blocks and we ended up implementing functionality for typing in a post ID and using […]

How to Access and Parse Gutenberg Blocks with PHP

In this post we’ll look at how to parse a post’s Gutenberg blocks and extract specific blocks to make something else. We’ll look at WordPress PHP functions for parsing, extracting and rendering chosen blocks. One benefit of the new Gutenberg editor in WordPress is more structured data for post content. In the older days everything […]

Create Custom Gutenberg Block – Part 9: Dynamic Blocks and PHP Render

So far we have rendered the block’s output in Javascript. However with dynamic content like recent posts or displaying a post we need to render the block’s output in PHP. In this post we’ll learn how, and why. Why do we need to handle dynamic blocks differently? Some examples are obvious; a block that displays […]

Posts navigation

« Previous 1 2 3 4 5 … 9 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)