Conditionally Load Block Assets

One of the great features of the WordPress Block Editor is all the specialty blocks that can be created. This can also be the downside, each of these niche blocks might load their own view assets; and if not done right, all these assets could load on every page. Web. Bloat. View assets are typically […]

Allowing SVG in WordPress Content

I ran into an issue when trying to save SVG as part of a block. If you are having the same issue, or similar with non-typical tags being used; then here’s how you can fix it. In creating a Gutenberg block, adding an SVG element as part of the save() function it was being stripped […]

wpsync – Markdown to WP

wpsync is a command-line tool to sync a local directory of markdown files to your WordPress. I really like markdown and vim. My publishing process was: Create a draft in markdown, When ready to publish v1.0 copy-paste to WordPress; the editor converts markdown nicely, and then publish However, when a revision is needed, it must […]

Making the Juxtapose Block

This post walks through my process of creating the Juxtapose Block for the WordPress block editor. The block implements the JuxtaposeJS library by Knight Lab which allows you to place two images side-by-side and use a slider to reveal the difference between them. Here’s an example: Breaking down the problem When creating a block, I […]

Block Rocking WordPress

WordPress 5.0 introduces a new editor based around blocks. The editor is the first phase of a larger project developed under the Gutenberg name. This post is part three in my unplanned series: Part I – Creating a Gutenberg Block from October 2017 covers how to extend Gutenberg with a basic block. I wrote a […]

Gutenberg blocks without the build step

You can create Gutenberg blocks in ES6 code without the build step, this makes it easier to maintain and develop. I switched over my Code Syntax Highlighting block and am much happier for it. All of the Gutenberg examples by default use ES5 code, which already does not require transpiling with webpack, but they also include […]

Gutenberg can do that!

A new editor is coming to WordPress, the project code name is Gutenberg but at some point it will be just the WordPress editor, for now it is referred to as Gutenberg or the Gutenberg editor. The focus of this article is on some of the new features you can do with Gutenberg. If you […]

Code Syntax Highlighting in Gutenberg

I’ve developed a WordPress plugin which extends the core Gutenberg code block adding color syntax highlighting. If you are using Gutenberg to display code and want some color, install and check it out. It is available at github.com/mkaz/code-syntax-block. I initially started to build as a separate block, but that introduced the issue of converting existing […]

Creating a Gutenberg Block

A tutorial on how to build a Gutenberg block. The intended audience is a WordPress theme or plugin developers with some Javascript experience interested in learning what it takes to create a block in the new Gutenberg editor. Updated: See my new post postĀ Gutenberg blocks without the build stepĀ for a simpler example without the extra […]

Install WordPress on Windows Subsystem for Linux

With the latest Creative Update on Windows you can run a full Linux environment, without the need of a virtual machine or other container system. It’s Linux on Windows, and it is pretty nice. The following instructions are how to setup WordPress on Windows Subsystem for Linux (WSL), it also sometimes called Bash on Windows, […]

Set the Featured Image in WordPress

I started my photo blog in 2005 and over the past 10 years run it on several different platforms, hosts and software. I started with a bunch of scripts I created myself, bounced around from self-hosted WordPress to Tumblr, back to self-hosted WordPress, back to custom scripts to WordPress.com and now once again back to […]

Hi, I’m Marcus Kazmierczak

Profile Photo I'm an engineer trying to do my small part to make the web a little better. I believe open source can help empower people, and grow our collective knowledge; moving the world forward. I hope this site is a small contribution to that collective.