In one of my other posts, Singular vs Plural WordPress Custom Post Type Permalink, I am displaying some URLs on their own line as part of the content. However, the WordPress oEmbed functionality tries to turn URLs on their own line into a rich content preview (e.g. a YouTube URL alone on a line creates […]
On a WordPress project, I wanted to display the full post on the blog archive unless a manual excerpt had been created for the post (in which case I wanted to use the manual excerpt). Here is the code I used to make this happen.
On Tuesday October 9, 2018 my G Suite Catch-All Email Address stopped working. Fortunately, I noticed rather quickly and found the best way to enable it again was to “turn it off, and back on again”. I’ve made notes about exactly how I did that in case others (or future me), finds it necessary.
When creating 301 redirects, I often want to check multiple URLs quickly from the command line (to avoid the manual clicking in the browser and browser caching of results). I’ve written this script to speed up my process.
When faced with a folder full of gzipped files, I found I was unable to use my usual go to program grep to search for text in the files. However, zgrep came to my rescue.
Setting up your computer to allow you to SSH in using SSH keys in place of passwords is magical however there are times I want to SSH in without using the SSH keys I have setup. By setting the “PubkeyAuthentication” key to “no”, you can do this.
I see lots of people get themselves into trouble when using git cherry-pick. By removing the commit from the source branch after cherry-picking, I’ve been able to avoid many of these problems.
When working with a WordPress image, I wanted the attributes for the image. The function `wp_get_attachment_image()` provides me everything I need but in a rendered HTML string, rather than a more useful array of attributes. I was surprised I was unable to locate a good way to get this information, so I wrote this code to help me.
I like to use the Scriptless Social Sharing WordPress plugin to add Share buttons to my blog posts. Recently I had a client notice that because the Email Share button has target=”_blank” in the HTML markup, it opens a new tab when clicked. This is great behavior if you’re using web based email (e.g. Gmail), however if you’re using an email application on your computer, you end up with a blank tab. This code removes target blank from the email share link.