Bind select2 to dynamically generated elements

March 31, 2019

In the course of our WordPress development, we often generate new <select> elements on the fly, after the DOM has been loaded jQuery’s document ready() has already run. Most tutorials demonstrate binding <select> with something like this: jQuery( function() { jQuery( “select.select2” ).select2({ // any options go here }); }); The challenge is that this…

How to force SSL on a WordPress website

March 3, 2018

Use of SSL instills confidence in your users and is a minor ranking signal to Google. Here’s how to force your WordPress site to use it.

Redirect everything except /wp-admin and wp-login.php

March 3, 2018

Often, a client asks us to take down a site — either temporarily or permanently — but they still need access to their WordPress administrative panel. As usual, there are lots of different ways to accomplish this; many SEO plugins allow you to create redirects, but require you to do so one post at a…

Creating a WordPress admin user in the database

March 3, 2018

If you need access to a WordPress site and have access to the database, this quick bit of SQL is the simplest way to create an administrator-privileged user.

A handful of my favorite Linux commands

November 13, 2017

This is a collection of some of my favorite Linux commands; things that I use regularly in the course of my work.