Journal entries tagged “Wordpress”
Using Tailwind CSS in a WordPress Environment
To develop themes and plugins, I use the @wordpress/scripts package to do the build work. It comes with pre-defined webpack configs which work well for creating blocks and working within the requirements of the block editor. This post will assume you have familiarity with setting up your dev environment to make use of @wordpress/scripts. Recently […]
Debounce an input using select hook in WordPress/Gutenberg
I was building a component for the block editor which accepts user input (i.e. a text search) and searches for matching posts. For various reasons I couldn’t use the <URLInput> component and needed to roll something more custom. I got stuck on this because when using the useSelect hook triggered by changes from a text […]
How to use SVN for updating WordPress plugins
I’m a git user, and I always forget how to use SVN to update my WordPress plugins for the official plugins repository listing. Here is a reminder to myself. This assumes you have svn installed on your system already. The first thing is to make the updates in the git tracked folder. Don’t make them […]
Using a Vue app within a WordPress plugin
Creating a full-fledged Vue.js application inside a WordPress plugin takes a little bit of special setup to the two code libraries working together. Here I’ll show the way I’ve been solving this, though I’m sure it’s not the only way. I’m going to skip a number of prerequisites: I’ll assume you already have the vue-cli […]
Transforming shortcodes to “blocks”
Check out my latest article series on the Bates Web Technologies site:
New Plugin: New York Times Bestseller Lists
I just posted a new plugin to embed New York Times bestseller Lists on your site. It’s geared towards libraries, but it will work well for any use. Check it out, it’s cool! This was also my first experience listing a plugin in the WordPress plugin directory, which was interesting and not at all the […]
Setting up Domain Mapping with WordPress MU
Most of this information can be found here, but I’d like to rewrite it for increased clarity and to add a few details. First some definitions: umbrella domain:Â the domain which houses the mu installation. other domain: the domain which will have a single WordPress site within the network. How To At the domain registrar, point […]
Shortcode to Use a WordPress widget in Page Content
A small snippet creating a shortcode which will display any widget.
Debugging WordPress Rewrite Rules
If you’ve ever tried to use WordPress’ rewriting functions, let alone debug them, you know pain. The terror that this experience visited on me spurred me to create this drop-in function which prints a list of all the current rewrite rules (in order), and highlights which rule was matched for the current view. You could […]
Using AJAX in WordPress
Most of the work of setting up an ajax action in the WordPress environment happens in php-land. The PHP File Register & enqueue your script. In this example, I’ll assume the script has already been registered. wp_enqueue_script( ‘myscript’ ); *I’ve had trouble when I’ve tried to enqueue the script at the wp_enqueue_scripts action and added […]