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 […]

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 […]

Continue reading →

How to make Markdown Footnotes start at Zero in WordPress


The Logo for WordPress.

As a dedicated and professional computer scientician0, I believe that all indices must start at zero. Not one, not two, but zero1. The zeroth2 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, […]

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: […]

Continue reading →

Liberate your Markdown posts from JetPack in WordPress


JetPack Markdown switched off.

A scrap of code which I hope helps you. Problem You installed the WordPress JetPack plugin and wrote all your blog posts in Markdown. Now you want to remove JetPack or replace it with a better Markdown parser. You turn off JetPack's "Write posts or pages in plain-text Markdown syntax". You click edit on a […]

Continue reading →

Replace Twitter Embeds with Semantic HTML


Tweet from me in 2009. "Ah. I appear to have spent the majority of the night playing World Of Goo What an addictive little game."

I logged into Twitter using a fresh account last week. No followers, no preferences set. The default experience was an unending slurry of racism and porn. I don't care to use Twitter any more. Whatever good that was there is now drowned in a cess-pit of violent filth. I still have a lot of Tweets […]

Continue reading →

Remove unnecessary closing slash on get_the_post_thumbnail() in WordPress


The HTML validator showing lots of info messages.

I am a pedant. I like it when validators say "nothing to report". No errors, no warnings, no information messages. My blog is plagued with messages on the HTML validator saying Info: Trailing slash on void elements has no effect and interacts badly with unquoted attribute values. By default, the WordPress function get_the_post_thumbnail() spits out […]

Continue reading →

Named Alternates for WordPress


Screenshot of Lynx, the text browser, showing named alternates.

HTML documents have the concept of an alternate representation of the document. For example, a page's header might say: <link rel="alternate" type="application/rss+xml" href="https://shkspr.mobi/blog/feed"> That tells you there's an alternative representation of the page, what sort of content it is, and where it is located. That's nice. But it's hard for a browser to tell the […]

Continue reading →

link rel="alternate" type="text/plain"


The Logo for WordPress.

Hot on the heels of yesterday's post, I've now made all of this blog available in text-only mode. Simply append .txt to the URl of any page and you'll get back the contents in plain UTF-8 text. No formatting, no images (although you can see the alt text), no nothing! Front page https://shkspr.mobi/blog/.txt This blog […]

Continue reading →

A completely plaintext WordPress Theme


Screenshot showing my blog rendered just as text.

This is a silly idea. But it works. I saw Dan Q wondering about plaintext WordPress themes - so I made one. This is what this blog looks like using it: The Code You only need two files. An index.php and a style.css. The CSS file can be empty, but it needs to exist - […]

Continue reading →