Let's say you want to automatically delete specific sorts of comments from your WordPress blog. For example, immediately trashing any comment that has a specific phrase "Elephant Juice" in it. You can do this by going to Settings -> Discussion → Disallowed Comment Keys. Or you can add something to your theme's functions.php file. Here's the code snippet: add_action( 'comment_post', '…
Continue reading →
There's a brilliant post by WordPress about how they've optimised some of the backend code to make it more efficient. So here's a suggestion for something else which can be optimised. If you want to schedule a blog post to be published later, you have to use this WordPress control: I find it mildly annoying. I don't get why part of it is a dropdown. And the number fields don't pop up my…
Continue reading →
This is ridiculously niche. If this is of help to anyone other than to me... please shout! The IntenseDebate comment system is slowly dying. It hasn't received any updates from Automattic for years. Recently it stopped being able to let users submit new comments. So I've switched to Commentics which is a self-hosted PHP / MySQL comment system. It's lightweight, pretty good at respecting users'…
Continue reading →
I blog. A lot. Too much really. One of the things I like to do is see what I was rambling on about this time last year. And the year before that. And so on. So, here's my On This Day page and here's how I built it. WARNING Extremely quick and dirty code ahead! This allows you to add a shortcode like [ edent_on_this_day ] to a page and have it auto generate a list of posts you published on this …
Continue reading →
I recently read Darek Kay's excellent post about styling RSS feeds and wanted to do something similar. So, here's my simple guide to styling your WordPress blog's RSS / Atom theme. The end result is that if someone clicks on a link to your feed, they see something nicely formatted, like this: Prerequisites This involves editing your WordPress blog's theme. If you don't know what you're…
Continue reading →
Someone recently complained that using JetPack's Akismet anti-spam plugin wasn't very privacy friendly. So, because I take every minor complaint as a personal rebuke, I decided to switch to AntiSpam Bee - an open source and local antispam solution. And... it's pretty good! There is the occasional false negative - but not significantly worse than JetPack. Most of the false negatives are from…
Continue reading →
I've been thinking a lot about footnotes in Markdown. I've contributed a patch to make them slightly better in WordPress. Now I'm wondering how to make them more useful by enhancing their pop-up title text. To that end, I'm writing a patch for PHP Markdown which will display the first ~200 characters of a footnote in the pop-up title text. Hover over the superscript number and you'll get a…
Continue reading →
I've started adding Restaurant Reviews to this blog - with delicious semantic metadata. Previously I'd been posting all my reviews to HappyCow. It's a great site for finding veggie-friendly food around the worlds, but I wanted to experiment more with the IndieWeb idea of POSSE. So now I can Post on my Own Site and Syndicate Elsewhere. The Schema.org representation of a Restaurant is pretty…
Continue reading →
This blog uses WebMention technology. If you write an article on your website and mention one of my blog posts, I get a notification. That notification can then be published as a comment. It usually looks something like this: This means readers of my post can see where it has been mentioned around the web. They can read your article after reading mine. Nice! I've also set up a "bridge"…
Continue reading →
WordPress's Jetpack plugin allows you to easily syndicate your blog to Twitter, LinkedIn, Tumblr, Email, and a few other services. But there's no native way to publish directly to your Mastodon feed. This is a guide to how I got my blog to publish every new post to Mastodon with a nicely formatted preview. This uses Jan's "Share on Mastodon" plugin which you'll need to install and configure. …
Continue reading →
About 2.5 years ago I proposed a small accessibility improvement to WordPress. It has taken a bit longer than I'd hoped but, as of WordPress 6.1 it has been merged! Now, if you're using the Classic editor, you'll get a larger and resizeable box for entering alt text. Because the text entry uses <textarea> most browsers will also show any spelling errors. Good spelling is essential for people …
Continue reading →
The best thing about WordPress is the plugin infrastructure. A million little gadgets to make your blog better. Sadly, there are all sorts of ways plugin authors can abuse their privileges. Dodgy code and user-hostile features sometimes make plugins more trouble than they're worth. Recently, the normally excellent Blubrry PowerPress plugin pissed me off. It's a useful plugin for publishing…
Continue reading →