Strategies for linking to obsolete websites

by @edent | # # # | 7 comments
Plugin offering to fix a broken link by replacing it with an archive link.

I've been blogging for a long time. Over the years, I've linked to tens of thousands of websites. Inevitably, some of those sites have gone. Even when sites still exist, webmasters seem to have forgotten that Cool URls Don't Change. I use the WordPress Broken Link Checker plugin. It periodically monitors the links on my…

Continue reading →

HOWTO: Regenerate Gravatars in WordPress

by @edent | # # | 1 comment
The Logo for WordPress

A troublesome plugin recently corrupted some of the avatars on my blog's comments. This is a quick HOWTO for regenerating them. Gravatars are based on the MD5 hash of a user's email. For some reason, the plugin had overwritten the avatar field with the text http://identicon This MySQL query finds all the comment IDs which…

Continue reading →

Using the WordPress mShots Screenshot API

by @edent | # # # | 5 comments | Read ~1,262 times.
The Logo for WordPress

A few years ago, I wrote about Google's secret screenshot API - a slightly cumbersome way to take website screenshots for free. There's another service which you may find simpler to use - mShots from WordPress. Here's how it works: Take any website link: https://twitter.com/JennyVass/status/1067855777040338944 URL Encode it: https%3A%2F%2Ftwitter.com%2FJennyVass%2Fstatus%2F1067855777040338944 Add it to the end of…

Continue reading →

Import Images From A Migrated WordPress

by @edent | # # # # # | 2 comments | Read ~422 times.
The Logo for WordPress

Here's how to solve a common WordPress problem. I want to re-import all my blog's images into the media library. I've moved my blog to a new host - but kept the same domain name. I started with a new WordPress install, the uploads folder still has all my images, but WordPress can't see them.…

Continue reading →

An "on this day" plugin for WordPress

by @edent | # # # # # | Read ~164 times.

Just me scratching my own itch. I want to create an RSS feed of all the blog posts which I'd published on this day in the past. For example, if today is 21st of November 2016 then this plugin will show blog posts written on 2015-11-21 2014-11-21 2013-11-21 And so on. You can view a…

Continue reading →

Google's AMP is a gilded cage

by @edent | # # # # # | 47 comments | Read ~73,755 times.

AMP is Google's attempt to re-fight the transcoding wars of the early 2000s. It is actively dangerous to the web ecosystem, helps disseminate propaganda, and is disliked by many users. If, like me, you made the mistake of trying out AMP on your website - you're in a tricky position if you try to remove…

Continue reading →

Don't use negative numbers for error codes

by @edent | # # # # | 7 comments | Read ~984 times.

A warning to programmers - try to understand how people will use your error codes. This morning, I was confronted with a rather bemusing error message on my WordPress blog: Ok, so this should "never happen" and yet somehow it has. I wonder what on earth the error code means? I selected the error code…

Continue reading →

Displaying WordPress Posts' JetPack Statistics Using stats_get_csv()

by @edent | # # # | Read ~659 times.

Here's a quick way to display how many times a WordPress post has been read. For this, you will need: A blog running WordPress. The JetPack plugin installed. The ability to edit your themes. Here's the snippet of code I'm using to add "This post has been read 12,345 times". I'll explain how it works…

Continue reading →

How To Style WordPress's Audio Player?

by @edent | # # | Read ~1,884 times.

WordPress has a built in media player. Chuck in an .MP3 or other sound file, and it will play directly in the browser. Nifty! The only problem is that is looks a bit... dull. (From Alex Fitch's Eola) It works, but it's not exactly what you'd call gorgeous, is it? Wouldn't it be nice if…

Continue reading →

WordPress Archive Calendar Widget

by @edent | # # # | 2 comments | Read ~809 times.

One of the most addicting aspects of Open Source software is the ability to scratch one's own itches. I've been blogging since 2004 - and while I'd never mistake longevity for expertise - I do take a certain pride in letting my readers know that I've spent over a decade bashing out words. So, I…

Continue reading →