Two awesome and interesting WordPress query strings for browsing websites:

  • ?orderby=modified
    • Example: https://ma.tt/?orderby=modified (Today, this indicates that for his 37th birthday post, Matt apparently went back and made a few tweaks/updates to some prior birthday posts.)
  • ?orderby=comment_count

These could be used in combination with a /feed/ path to get an update of a WordPress site, potentially for updating posts within one’s digital garden and distributing as a feed.

GWG in #wordpress 2021-01-18 ()

Quoted a tweet by WP Buffs (@thewpbuffs) (Twitter)

This should be fantastic! I can’t wait.

Read How To Migrate From WordPress To The Eleventy Static Site Generator by Scott DawsonScott Dawson (Smashing Magazine)
If you’re a designer or developer with intermediate knowledge of HTML and JavaScript, and know your way around GitHub and the command line, this tutorial is for you. We’re going to walk step-by-step through converting a WordPress site into a static site generated from Markdown.

Automating syndication of reply contexts in Twitter Cards using OGP metacrap and plugins in WordPress

A Metacrap Problem

It’s metacrap–I know, I know–but I’ve been thinking about easy ways to use Open Graph Protocol meta data to add contextual Twitter cards to some of my content when syndicating posts to Twitter. My goal is to leverage the speed and ease-of-use of Micropub clients while doing as little as possible manually, but achieving as much parity between posts on multiple sites. 

I’m particularly keen to do this to syndicate/share more of the articles I read and post about on my site without adding additional manual work on my own part.

Outline of Some Resources

The Post Kinds plugin for WordPress parses URLs for me and pulls in data to create reply contexts for a variety of posts like bookmarks, reads, watches, listens, etc. Since Post Kinds doesn’t display featured images (yet), I’ve also been using the External Featured Image plugin to display the featured images from the original to add to the reply context of my posts as well. 

In addition to all these I’ve been using the All in One SEO plugin to easily add an SEO layer to posts without having to do much thinking about it. AIOSEO recently upgraded their UI and features in the last year, and yesterday I upgraded to the newest v4.0+. One of the new features it’s got is the ability to add default fields or pull in pre-existing custom fields to output OGP meta data. 

Start of a Solution

So I got the idea that since Post Kinds and External Featured Image plugins are pulling in and displaying the sort of data I’d like to show in Twitter cards, I figured why not use them? While metacrap is a DRY violation, the fact that it’s automated for me and is based on data I’m actually showing visually on my website makes it feel much less dirty. It also has the benefit that it helps make some of my syndicated content look and feel on Twitter, more like it does on my website. This is also a problem since Twitter hampers how much data I can syndicate in a single post.

I’ve still got some issues about how to deal with the Post Kinds data, but after a bit of digging around, I discovered the image URL for External Featured Image plugin is hiding in the _dcms_eufi_img field. So I can make the default Twitter settings in AIOSEO pull the external image by setting Default Post Image Source to Image from Custom Field and set the Post Custom Field Name to _dcms_eufi_img

Since a lot of my posts are reads, bookmarks, etc., this works well, but I can easily override the settings for articles or other custom posts which I make less frequently. 

Hopefully I can figure out the settings for Post Kinds to get the rest of the default fields to map across. I’m happy to hear ideas on what field names I’d need to use to get the Post Kinds Name and Summary/Quote fields to map over for the og:title and og:description respectively. Ideally I can manage to get it done without needing to get a subscription to the pro version of AIOSEO which also has support for custom taxonomies which is how Post Kinds works.

Since my theme has relatively solid microformats support, and I have plugin infrastructure to allow easy syndication from my website to Twitter through micropub clients, this last bit for creating Twitter reply contexts helps close some of the loop for me in my syndication workflow while keeping as much context across platforms.

Example

Here’s a visual example of a native post on my site and the corresponding syndicated copy on Twitter. There are some differences, mostly because I don’t have as much control of the appearance on Twitter as I do on my own site, but they’re about as close as I can get them with minimal work.

screen capture of a tweet with my thought at the top and a Twitter card underneath it including the reply context of the article I'm responding to

screencapture of a read post on my website for a Slate article with a reply context at the top and my response to it just below

I wasn’t seeing it before, but after upgrading to All in One SEO to 4.0.9 from 3.7ish, the Twitter plugin was throwing in some Twitter card metacrap that was causing a conflict. I’ve turned off the Twitter plugin which shouldn’t affect much since I wasn’t really using much of it’s additional functionality.

Hooray for one less plugin in the stack!

Crediting your own website when syndicating to Mastodon with WordPress plugins

I’ve been tinkering around with methods to automatically syndicate (POSSE) content from my personal website to Mastodon. I’ve been working at making a custom plugin which is far from finished. But a test post I made the other day, caught a few people’s attention[1][2]

I was trying to syndicate from my website so that the post on Mastodon would credit my website for the post and link back to my homepage as the application that made the post. You’ll notice at the bottom of the post there’s the post date and a globe icon, which indicates the post is public, followed by my website name ‘BoffoSocko.com’ and details about replies, reposts, and favorites.

screen capture of a Mastodon post which gives credit to Boffosocko.com at the bottom of the post.

I assuredly won’t release a public plugin for WordPress that does this. But since some have asked how I did it, I thought I’d share some of the internals of a few WordPress plugins that one can quickly modify to achieve the same thing.

That I can currently see, there are three plugins in the repository that will allow one to syndicate content to a variety of Mastodon instances. They are Mastodon Autopost, Mastodon Auto Share, and Share on Mastodon. The first two are closely related and essentially replicate the same codebase.

Similar to using Twitter’s API to crosspost, Mastodon is looking for two bits of information when an application is registered: a client name and a website URL. 

Mastodon Autopost and Mastodon Auto Share, both have a file called client.php which define these two variables. 

public function register_app($redirect_uri) {
  $response = $this->_post('/api/v1/apps', array(
    'client_name' => 'Mastodon Share for WordPress',
    'redirect_uris' => $redirect_uri,
    'scopes' => 'write:statuses write:media read:accounts',
    'website' => $this->instance_url
  ));

You can edit this file with a text editor to change the 'client_name' from 'Mastodon Share for WordPress' to 'Anything You Want'. If you’re in a joking mood, maybe change it to 'Twitter'?

To change the URL so that the link on the client_name directs to your website, you’ll want to change the line 'website' => $this->instance_url.

In particular change $this->instance_url to 'https://example.com' where example.com would be your website. I’ll note that $this->instance_url on this line in the original plugin is a bug. If left alone, it points the URL to your home Mastodon instance instead of to the more logical https://wordpress.org/plugins/autopost-to-mastodon/ where the plugin lives. 

If you prefer using Jan Boddez‘ excellent plugin, you’ll want to do something similar, except in that case you’ll want to change a file named class-options-handler.php in the includes folder.

Here you’ll want something like:

'client_name'   => __( 'Example.com' ),

But note that Boddez doesn’t have a similar bug, so the website line

'website' => home_url(),

is already correctly defined so that your website will automatically be linked without any changes to it.

If you’re already using one of these plugins and manually modify them, note that you’ll probably need to re-authorize the plugin so that the changes propagate.

Read Getting Started with Block Themes by Ben DwyerBen Dwyer (ThemeShaper)
The rationale With Full Site Editing on the horizon for WordPress, Theme creators need to start to learn how to make themes in a different way. Full Site Editing is sea change in the way that themes work. When Themes were first added to WordPress, they were simple; just a few template files and some...
This makes it seem like new themes with Gutenberg may be easier than I would have suspected? I may have to try this out soon, though I should also look at some of the newer themes that are out that use similar set ups.
David Shanske is such a rascal. Cloudy with a Chance of Meatballs indeed!
screencapture of posting interface for Simple Location plugin with options like Dust, Earthquake, Fire, Flood, and Cloudy with a Chance of Meatballs among other weather options
Look what I found hiding in the weather settings in the Simple Location Plugin for WordPress
Replied to Twenty Twenty-One Available for Download by Mel Choyce (melchoyce.design)

I had the privilege of designing this year’s WordPress default theme, Twenty Twenty-One, which was released yesterday alongside WordPress 5.6. I started working on the initial concepts for the theme back in July, so seeing it finally launched is fantastic.

This is awesome news. Congratulations on the culmination of a lot of hard work! I can’t wait to start tinkering with it, particularly to see what I can learn from it by looking at the code.

Some modification ideas to the Curator’s Code Plugin

I quietly wonder what it would take to modify the zip file for the Curator’s Code Plugin to take advantage of Parse This to input a URL and parse back a small snippet of context for more easily giving credit to posts in the WordPress classic editor?

It looks like it used to be in the repository, but perhaps with the rise of Gutenberg, they opted not to maintain it? 

I follow most of the code there, but I’m thinking too much of the actual output is done via JS with tinyMCE, so maybe I’m missing some of the finer portions. It also needs some tweaks to redirect to maybe the Internet Archive since curatorscode.org no longer exists.

I’m thinking an output closer to the following for each type might still be simple, but provide some additional context, (presuming my microformats aren’t too horrific/mis-nested):

<p><small><cite class="h-cite via"><abbr title="via">ᔥ</abbr> <span class="p-author h-card">AuthorTK</span> <a class="u-url p-name" href="https://example.com/TK" target="_blank" rel="noopener noreferrer">TitleTK</a> (<time class="dt-published">2020-TK-TK</time>)</cite></small></p>

<p><small><cite class="h-cite ht"><abbr title="hat tip">↬</abbr> <span class="p-author h-card">AuthorTK</span> <a class="u-url p-name" href="https://example.com/TK" target="_blank" rel="noopener noreferrer">TitleTK</a> (<time class="dt-published">2020-01-29</time>)</cite></small></p>

Hopefully the via and ht classes also give people enough to latch onto for doing some custom styling of the output if necessary.

With more prevalence of crediting like this, I also wonder how parsers might better display received webmentions for these types of notifications beyond the basic “Sue mentioned this”. Maybe a facepile of avatars under the heading “Inspired by this post”?  Though the way “via” is used in practice, it might also fit under the category of a repost?

Replied to a thread by Bopuc and Ryan Bateman (Twitter)
And for WordPress you can already use the Webmention plugin and optionally the Semantic Linkbacks plugin to implement sending and receiving them for your own site.

In many cases, sites sending these notifications with the proper microformats mark up means that you can get some really beautiful replies to show up in your comments section (esp. in relation to how the old linkbacks/trackbacks looked). Webmention also has some structure as well as potential extensions to prevent the spam that the prior implementations encouraged.

If you reply to my syndicated copy of this post on Twitter, I’m also using the free service Brid.gy to have Twitter send these notifications to my personal website, so I’ll see your reply on my original post without actually needing to visit Twitter directly. This means that not only can I do threaded replies between my site and another WordPress site (or any other site that supports Webmention), but I can do threaded conversations between my site and Twitter.

Now if you want to take this the next few logical steps, add Micropub support to your website, and start using a social reader like Indigenous. That will let you write replies to content in your reader that will automatically post those repsonses/replies to your website, but then your site can ping the site you were responding to! The specifications allow a true social media experience between websites running different software on different URLs. Some documentation for the WordPress side of things: https://indieweb.org/Getting_Started_on_WordPress

The more sites that support these specifications, the richer the ecosystem becomes.