Skip to content

Chris Aram

Migrating a Yoast meta description to a WordPress post excerpt

By Chris Aram / April 24, 2019 /

Yoast is a helpful WordPress plugin, but I prefer to use the WordPress excerpt to generate a meta description. Here’s a quick bit of SQL to convert historical Yoast meta to the WordPress excerpt.

Read More

Avoiding lock-in

By Chris Aram / April 24, 2019 /

Details to come.

Read More

Why WordPress?

By Chris Aram / April 20, 2019 /

Lorem ipsum.

Read More

Export a list of all pages or posts containing content in WordPress

By Chris Aram / April 18, 2019 /

Recently, I needed to obtain a list of all WordPress pages or posts to which a Gravity Form had been published, in order to ensure that our caching plugin wasn’t interfering with them. SELECT * FROM `wp_posts` WHERE post_content LIKE ‘%[gravityform%’ AND post_status = ‘publish’ AND post_type IN( ‘page’, ‘post’ )

Read More

Delaying or pausing the execution of a jQuery .each() loop

By Chris Aram / April 14, 2019 /

Recently, I wrote a scraper app which fetches a series of pages, pulls all of the <img /> tags into a list and then downloads them to the user’s computer. (Back story: we often work with clients who want to transfer their website away from a closed-source provider like Squarespace. These providers often do not…

Read More

Filter the entire document generated by WordPress

By Chris Aram / April 12, 2019 /

WordPress provides a vast array of filters with which you can modify the content that gets written to the generated HTML; many theme and plugin authors introduce additional filters of their own. While you can readily filter primary post or page content with the_content, what happens if you need to filter the entire output generated…

Read More

Export a list of posts, tags and categories from WordPress

By Chris Aram / April 8, 2019 /

This complex SQL query can generate a complete table of your WordPress posts, plus a comma-separated list of both categories and tags.

Read More

Export a list of WordPress users from MySQL

By Chris Aram / April 8, 2019 /

Need to pull a list of your users from WordPress, but don’t want to fiddle around with test-driving a dozen plugins? You can use this quick SQL statement to obtain a complete export.

Read More

Bind select2 to dynamically generated elements

By Chris Aram / 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…

Read More

How to force SSL on a WordPress website

By Chris Aram / 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.

Read More

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

By Chris Aram / 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…

Read More

Creating a WordPress admin user in the database

By Chris Aram / 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.

Read More

A handful of my favorite Linux commands

By Chris Aram / 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.

Read More