Bonum Certa Men Certa

Modifying WordPress to Include Gemini Links in All Articles (Assuming a Canonical URL Form)

Links



Summary: In order to promote the departure from the World Wide Web (where possible and suitable; sites with text don't typically need Web-like features) one can promote the analogous pages in one's Gemini capsule; we suggest a way of doing so in WordPress (the most widely used CMS)

Different sites implement their Gemini (protocol) version differently. We intend to publish all the source code we've produced under the AGPLv3. In the meantime, for WordPress itself, here's what it takes to display to readers the analogous page/address in Gemini. Canonical links are assumed.



"The Web as a whole is problematic and it would help to have the FSF promote Gemini."The change typically requires using one's template of choice (WordPress has templates to separate changes from the "core"). In our case, we've edited single.php to include the Gemini page of a given "single" post. For a site that just uses another protocol but the same URL structure the following may do:

<?php $permalink = get_permalink(); $find = array( 'http://', 'https://' ); $replace = ''; $output = str_replace( $find, $replace, $permalink ); echo '<p>gemini://' . $output . '</p>'; ?>

Change the 'smart' quotes to something "normal".

They key is removing the http/https part, then replacing it with something else ("gemini://gemini." in our case). There's also the preg_replace approach, but it can get a tad problematic:

<?php $gemini = preg_replace('http', '', get_permalink()); echo $gemini; ?>

LinkIn Techrights we've used

<?php $permalink = get_permalink(); $find = array( 'http://', 'https://' ); $replace = ''; $output = str_replace( $find, $replace, $permalink ); echo '<p>This post is also available in <a href="http://techrights.org/gemini/" title="Techrights on Gemini">Gemini</a> over at:</p> <p><u>gemini://gemini.' . $output . '</u></p>'; ?>

It has meanwhile emerged that the FSF, perhaps belatedly, realised that Twitter is no longer acceptable. For reasons we've mentioned since November of last year. The Web as a whole is problematic and it would help to have the FSF promote Gemini. The FSF mostly uses Drupal as a CMS.

Recent Techrights' Posts

The Slop Presumption Rule
Tainting oneself can take one day
August 2026 Microsoft Layoffs Are "Secret Layoffs" or "Silent Layoffs"
It's all about secrecy, isn't it?
Newer Not Better: Treadmill Updates Cause Problems
after 2 years the un-updated machines still fine
SLAPP Censorship - Part 136 Out of 200: Lawyers That Get Paid to Mess About
They were already outnumbered and understaffed
 
Why Techrights Will Still be Active a Decade From Now
Techrights will carry on for many years to come
We Are Witnessing the End of IBM
IBM cannot find growth by moving downwards, by lowering standards
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Saturday, August 01, 2026
IRC logs for Saturday, August 01, 2026
Gemini Links 02/08/2026: Older Books, Esperanto Music History, and Slop Making Things Worse
Links for the day
Sharing and Empathy
Be more like Stallman, not Linus
Fedora 'Community' Became 100% IBM Staff, Drawing Up Policies Like CoC and CoI (Where the IBM is Excepted From Conflict of Interest Policies)
IBM has in effect killed Fedora
Gemini Links 01/08/2026: Planner Season is Upon Us, Slop "Apocalypse", and USENET
Links for the day
Cuts at IBM, Allegedly More Shutdowns to Come, CEO Visits Complicit Media to Promote Lies and Products That Will Never Exist (Misleading Shareholders)
IBM is collapsing
Links 01/08/2026: GAFAM Falling Deep Into Trillion in (Secret) Debt to Keep the Slop Bubble From Popping Already, Anger Over "FIFA’s World Cup Privatisation Plan"
Links for the day
The Cyber Show on the Slop Bubble
new article about the implosion of the slop bubble
Links 01/08/2026: New York Times Trying to Inflate the Slop Pyramid Scheme (at Cost to Its Own Reputation) and "Iran Appears to Be Blasting Amazon Data Centers Off the Map"
Links for the day
Positive Political Momentum
Daniel Pocock is taken seriously by many people who contact us privately
Google "AI" is Plagiarism, the Case of Richard Stallman (RMS)
Why would anyone choose LLM slop over the originals, curated and fact-checked by domain experts?
Explaining That Software Patents Are Neither Legal Nor Desirable
Many of our readers work in the legal sector
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Friday, July 31, 2026
IRC logs for Friday, July 31, 2026
Gemini Links 01/08/2026: Retirement, Bike Trips, Quake Stuff, Usenet Reborn
Links for the day
Links 31/07/2026: Microsoft Now Says Slop is Bad (LinkedIn Cracks Down on It), LinkedIn Narrows Down Size (No Expansion)
Links for the day
European Patent Office (EPO) Series: From Alicante to Munich: Another Smooth Ride
Campinos is intent on transforming what was originally envisaged as a temporary public office into his own permanent personal feather-bed
Daniel Pocock and the Important Observation About Threats of Cult-Like Behaviours (No Rationality, No Reason, Just "Mob Rule")
It's a threat to Europe's sovereignty
The "PIP Parade" of IBM's Lousy Management, Which Said "Blockchain" Was the Future
In a healthy company such a CEO would be punished for utterly wrong visions and predictions. Not at IBM...
SLAPP Censorship - Part 135 Out of 200: Limited Liability Partnership (LLP) That Does Not Disclose Financial Activities Before August
It certainly looks like they keep losing the remaining women that still exist in the firm
Links 31/07/2026: "Climate Cover-Up Continues" and Pesticides "Cook the Planet"
Links for the day
Datacentre 'Boom' Sceptics Aren't Luddites, They Recognise a Threat to Human Survival (Not Limited to Climate Change)
Archaeologists very well know that no species will survive forever
Microsoft's Claims Are Based on a Big Lie
the bubble is coming to its hard limits
Don't Lose Sight of the Impact of "End of 10" (Vista 10)
GNU/Linux has taken off fast
Microsoft's Debt Continues to Steadily Increase, Not Counting Hundreds of Billions in Secret/Hidden Debt
The mass layoffs will carry on, maybe labelled LITE
IBM is Circling Down the Drain, the 'Growth' Comes From Beancounting Tricks and Salary Cuts
IBM was down 2.17% yesterday
Microsoft's "Headcount" Distracts From How Big a Cull It Had This Month
It also speaks of numbers "[a]s of June 30" though the "buyouts" were effective July 1 and since then well over 10,000 workers have vanished
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Thursday, July 30, 2026
IRC logs for Thursday, July 30, 2026
Gemini Links 31/07/2026: Music, Journaling, and Longing
Links for the day