• Skip to primary navigation
  • Skip to main content
Sal Ferrarello
  • About Sal Ferrarello
  • Speaking
  • Connect
    Mastodon GitHub Twitter (deprecated)
You are here: Home / Archives for WordPress

WordPress

Filter Meta in WordPress Gutenberg Block Editor

Last updated on January 10, 2026 by Sal Ferrarello

I work with WordPress sites that have lots of meta fields exposed through the REST API. Within Gutenberg, I’m often checking those values by querying the “meta” attribute in the data. Sometimes the larger number of meta fields makes it difficult to find the specific fields I’m interested in. To make my life easier, I’ve put together a code snippet that filters the keys in the meta object that is returned.

Filed Under: Computing, Dev Tips, Solution Tagged With: Gutenberg, WordPress

unregisterFormatType() for Specific Block Type in Gutenberg

Last updated on February 17, 2025 by Sal Ferrarello

The WordPress block editor (a.k.a. Gutenberg) allows formatting in RichText fields via the Formatting Toolbar API](. Each type of formatting (e.g. Bold and Italic) is a “formatType”. Here we’ll look at removing one of these formatTypes from a specific block type (e.g. removing Bold from the core paragraph block).

Filed Under: Dev Tips, Programming, Solution Tagged With: Gutenberg, WordPress

WP CLI Get Current Theme

Last updated on October 30, 2024 by Sal Ferrarello

I thought retrieving the currently active theme on a WordPress website with WP CLI would involve the “wp theme” command but I was wrong. The correct command to get the currently active theme is “wp option get current_theme”.

Filed Under: Computing, Dev Tips, Solution Tagged With: WordPress, WordPress Theme, wp-cli

WP CLI Find in Post

Last updated on August 9, 2024 by Sal Ferrarello

Sometimes I want a list of blog posts that contain a certain string. For example, I might want a list of all blog posts that contain the word “kazoo” using WP CLI. My favorite tool for this is “wp post list”.

Filed Under: Dev Tips, Solution Tagged With: WordPress, wp-cli

Quick and Dirty WP CLI

Last updated on January 19, 2024 by Sal Ferrarello

During development or troubleshooting I often find myself wanting to run something through WP CLI. These are some notes on running code through WP CLI.

Filed Under: Dev Tips, Programming Tagged With: WordPress, wp-cli

WordPress Multisite Skip Confirmation Email

Last updated on August 1, 2023 by Sal Ferrarello

When creating a new user on WordPress multisite there is a “Skip Confirmation Email” checkbox that is unchecked by default. This unchecked box results in a user being added to a temporary “signups list” when they are added to the site. The user is not fully added to the site until they complete the confirmation steps in the email they receive. For many sites, it is preferable to check this “Skip Confirmation Email” when adding a user. With some code you can set this checkbox to default to checked.

Filed Under: Programming, Solution Tagged With: WordPress, WordPress Multisite, WordPress Plugin

How to Close and Re-Open WordPress Gutenberg Sidebar

Last updated on June 30, 2023 by Sal Ferrarello

The sidebar gets a lot of use in the WordPress Block Editor, a.k.a. Gutenberg, but I found myself in a situation where I needed to programmatically close the sidebar and then re-open it later. This is how I did it.

Filed Under: Dev Tips, Programming, Solution Tagged With: Gutenberg, JavaScript, WordPress

Get Last Modified Value of a WordPress Post

Last updated on June 19, 2023 by Sal Ferrarello

When reading an article online, I find it helpful to know when the article was last updated. Not all blogs display the last updated value however even when the last updated value is not displayed, the value is accessible via the WordPress REST API. This is how I retrieve the last modified value from the WordPress REST API.

Filed Under: Computing, Dev Tips, Programming, Solution Tagged With: JSON, REST API, web browser, WordPress

Change Render Size of Featured Image in WordPress Gutenberg Block Editor

Last updated on May 7, 2023 by Sal Ferrarello

In the WordPress block editor (a.k.a. Gutenberg) the “Featured Image” is rendered at the WordPress ‘large’ image size by default. By adding a WordPress JavaScript filter to the ‘editor.PostFeaturedImage.imageSize’ hook, we can change this default rendering.

Filed Under: Dev Tips, Programming Tagged With: Gutenberg, JavaScript, WordPress, WordPress Filter

WordPress View Block Attributes

Last updated on February 8, 2023 by Sal Ferrarello

When developing a WordPress plugin that creates a Gutenberg block, it is invaluable to be able to view the attributes on the block. Here are some tricks I use to view this information.

Filed Under: Computing, Dev Tips, Programming, Solution Tagged With: block, Gutenberg, WordPress, WordPress Plugin

  • Page 1
  • Page 2
  • Page 3
  • Interim pages omitted …
  • Page 13
  • Next Page»

Copyright © 2026 · Bootstrap4 Genesis on Genesis Framework · WordPress · Log in