WP plugin: META Relationship Links

posted on August 29, 2005  (Update: December 23, 2005)

Another WordPress plugin I had sitting around doing nothing. Might as well release it, and make it look like I’m busy on the blog…

The META Relationship Links plugin inserts a START, FIRST and LAST rel(ationship) link tag in the head of your blog pages. On individual posts it also adds tags for PREV(ious) and NEXT. START represents the home page of your blog, while FIRST and LAST are the first and last posts. PREV and NEXT are obvious (hopefully).

To install, follow these very complex instructions to the letter: download the zip file and extract meta-relationship-links.php from it, upload this to your wp-content/plugins/ directory, and activate META Relationship Links under Plugins in WordPress. If your theme already calls the wp_head() plugin hook from the <head> of you pages, the plugin works automatically. If not, I recommend adding this on its own line before the closing </head> tag, typically located in the header.php template of a theme:

<?php wp_head(); ?>

That should be it.

It’s possible at this point you’re wondering what use is there to outputting all these rel link tags. Good question—but I’ll let the Internet at large take care of expounding:

Providing additional navigation aids (Dive Into Mark)
Accessibility for Web Developers (Guideline 13: Provide clear navigation mechanisms)
W3C’s descriptions of link types

Disclosure time: I note above this was something I wrote (for a side project) and sat on awhile, and released only in regards to a call to muddy arms. Well it turns out my plugin never came close to being first in the mudpit. So if you don’t like this one, try David’s. Or vice-versa. As I allude to from time to time, I’m all about options. Or something.
Update [Dec-23-2005]: R1.1 Slipped in a bit of code to hide WP database errors on single posts (for rel=prev/next) when an invalid post query occurs.

Author: Kaf Oseo
Categories: WordPress
Comments: (7) · Leave a comment · Comments RSS2 · Trackback URL

Jonathan
Comment » April 1, 2007 @ 6:05 pm

Do you plan to continue development on this plugin to make it ignore future-dated posts?

luc walter
Comment » July 13, 2007 @ 1:45 pm

Hi, I need you help please.
I m looking a way to add something like a picture or javascript after the end of each post in wordpress. I want to create a plugin which can do that automatically but I don t know which wordpress code to use.
Thanks

Boris
Comment » August 29, 2007 @ 3:09 am

Hello, Kaf
Thanks for your plugin.
I have installed it, but it doesnt work.
I run WP 2.2.2 and K2. It already has in its header code, but it doesn’t display what it should.
I have tried to play around with custom header options, like show text/don’t show text, but it didn’t help.
The thing is, I like K2. But I don’t like how it displays navigation: try to move mouse around the header: http://www.memorycemetery.com/about/
You see how it is annoying. I can’t take it off completely, as home page isn’t displayed in my Site Map on the sidebar.
So I looked for a plugin as yours…
Any ideas?
Thanks for the consideration in advance,
Boris

manele
Comment » December 10, 2007 @ 2:15 pm

hello Kaf! thank you for your very useful plugin!

 

* Required field (e-mail is not published). Breaks and paragraphs are automatic. HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>