Using Tempest Highlight with WordPress


The HTML5 Logo.

I like to highlight bits of code on my blog. I was using GeSHi - but it has ceased to receive updates and the colours it uses aren't WCAG compliant. After skimming through a few options, I found Tempest Highlight. It has nearly everything I want in a code highlighter:  PHP with no 3rd party dependencies.  Lots of common languages.  Modern, with regular updates.  Easy to use fun…

Continue reading →

Change the way dates are presented in WordPress's admin view


The Logo for WordPress.

WordPress does not respect an admin's preferred date format. Here's how the admin list of posts looks to me: I don't want it to look like that. I want it in RFC3339 format. I know what you're thinking, just change the default date display - but that only seems to work in some areas of WordPress. It doesn't change the column-date format. Here's what mine is set to: So that doesn't work. …

Continue reading →

Graphing the connections between my blog posts


A force directed graph showing how four different posts link to each other and how their hashtags relate.

I love ripping off good ideas from other people's blogs. I was reading Alvaro Graves-Fuenzalida's blog when I saw this nifty little force-directed graph: When zoomed in, it shows the relation between posts and tags. In this case, I can see that the posts about Small Gods and Pyramids both share the tags of Discworld, Fantasy, and Book Review. But only Small Gods has the tag of Religion. …

Continue reading →

Order WordPress Posts by Most Comments


The Logo for WordPress.

I take great delight in seeing people reply to my blog posts. I use WebMentions to collect replies from social media and other sites. But which of my posts has the most comments? Here's a snipped to stick in your functions.php file. It allows you to add ?comment-order to any WordPress URl and have the posts with the most comments on top. // Add ordering by comments add_action( 'pre_get_posts', …

Continue reading →

Is WordPress.org GDPR compliant?


39 people reacted with 💯. 12 with ☝.

A few weeks ago, I got a chance to speak truth to power. I used my WordPress.org account to sign in to the official WordPress.org Slack where the various WordPress dramas were being discussed. After a brief chat about the latest shenanigans, I publicly replied to the CEO: Here's a link to the full exchange There was no reply forthcoming - although, as you can see, my message gathered a fair…

Continue reading →

Change WordPress Fragment Links in RSS Feeds to be Permalinks


A glowing red mushroom cloud caused by an atomic bomb.

Here's a knotty problem. Lots of my posts use URl Fragments. Those are links which start with #. They allow me to write: <a href="#where-is-this-a-problem>Jump to heading</a> So when someone clicks on a link, they go straight to the relevant section. For example, they might want to skip straight to how to fix it. Isn't that clever? Where is this a problem? This works great when someone is…

Continue reading →

Using phpList for a blog's newsletter


RSS Settings Screen.

Some people like to receive this blog via email. I previously used JetPack to send out subscriber messages - but it became increasingly clear that Automattic isn't a good steward of such things. I couldn't find any services which would let me send a few thousand subscribers a few emails per week, at zero cost. So, redecentralise! I installed phpList which is an open source email campaign tool. …

Continue reading →

WordPress - Sic Transit Gloria Mundi


The Logo for WordPress.

Why do so many vastly-wealthy tech personalities go mad? My ideal job involves being employed by a millionaire tech-bro. Just before they get on stage, or moments before they file a lawsuit, or an instant before they publish their thought leadership - I will appear to them. I will be dressed in rags, body smeared with excrement, weeping sores blotching my face. I will sidle up to them, lean…

Continue reading →

Import JetPack Statistics into Koko


Graph showing page views over time.

I've quit JetPack stats. I've moved to Koko Analytics. All the stats code is self hosted, it is privacy preserving, and the codebase is small and simple. But I am vain. I want all my old JetPack stats to appear in Koko so I can look back on the glory days of blogging. Koko has two main tables. The first is a summary table called wpbp_koko_analytics_site_stats : date visitors …

Continue reading →

Liberate your daily statistics from JetPack


Bar chart showing how many times a blog has been red over a year.

Because Ma.tt continues to burn all of the goodwill built up by WordPress, and JetPack have decided to charge a ridiculous sum for their statistics, I've decided to move to a new stats provider. But I don't want to lose all the statistics I've built up over the years. How do I download a day-by-day export of my JetPack stats? Luckily, there is an API for downloading all your JetPack stats! …

Continue reading →

How to make Markdown Footnotes start at Zero in WordPress


The Logo for WordPress.

As a dedicated and professional computer scientician, I believe that all indices must start at zero. Not one, not two, but zero. The zeroth element is sacrosanct to our creed; for in the beginning there was nothing. If you're using WordPress's JetPack, it uses an ancient version of Markdown Extra. You can either monkeypatch this, or install a separate Markdown plugin. I've patched my fork of…

Continue reading →

WordPress - Display hook action priority in the dashboard


List of actions with various priorities.

If your WordPress site has lots of plugins, it's sometimes difficult to keep track of what is manipulating your content. Ever wondered what priority all your various actions and filters have? This is a widget which will show you which actions are registered to your blog's hooks, and their priority order. It looks like this: Stick this code in your theme's functions.php or in its own plugin. …

Continue reading →
OSZAR »