The Wayback Machine - https://web.archive.org/web/20110718033600/http://blog.abodit.com:80/category/search-engine-optimization-seo/wordpress-seo

WordPress

A WordPress plugin to link pages by ID but still have SEO friendly permalinks

WordPress provides several ways to link to other pages or posts on your blog or web site, but none of them was good enough for what I wanted so I wrote this plug-in.

Requirements:-

  • 1) Link pages so that even if the page changes its permalink path while you are constructing your site, links from other pages don’t break.
  • 2) Use full SEO friendly permalinks throughout the site, never show a user an url like ?p=145

To use it you find the page or post id (you can see it on any page you are editing in the URL), then add a shortcode like [permalink id=123 text="Link text"]. If you omit the link text it will use the current page title.

With this in place you are free to change any page’s permalink during the development process, or even to develop the site under a different domain and then move it to the final domain, and nothing breaks during the process! Of course you shouldn’t go changing permalinks after you’ve deployed your site: that would break inbound links including urls that Google has cached in their search results, but during the development process this plugin can help ensure all the links work even as you make major changes to the structure of your site.

I also added a [childpages id=3] shortcode which gives you a list of pages under a particular page in the navigation structure of your site.

Here’s the code, save it to a .php file in your plug-ins directory and activate it.

<?php
/*
Plugin Name: Ian's Page Links extensions
Plugin URI: http://blog.abodit.com/wordpress
Description: Allows you to link to pages using just the page or post ID [permalink id=3 text='xxx'] also provides a way to list child pages under a given page: [childpages id=5]
Version: 1.0
Author: Ian Mercer
Author URI: http://blog.abodit.com
License: GPL2
*/

function ian_childpages($atts)
{
  extract(shortcode_atts(array(
   'id' => 8
  ), $atts));
  $children = wp_list_pages('title_li=&child_of='.$id.'&echo=0');
  return '<ul>'.$children.'</ul>';
}

function ian_permalink($atts)
{
  extract(shortcode_atts(array(
   'id' => 3,
   'text' => 'Missing'
  ), $atts));
  if ($text == 'Missing') $text=get_the_title($id);
  return '<a href="'.get_permalink($id).'">'.$text.'</a>';
}

add_shortcode('childpages','ian_childpages');
add_shortcode('permalink','ian_permalink');

?>

WordPress Plugins I’ve found useful so far

Broken Link Checker
Checks your posts for broken links and missing images and notifies you on the dashboard if any are found.

Flash Photo Gallery
Creates a Flash Photo Gallery like one provided in Adobe Photoshop CS2 Flash Web Photo Gallery templates.

Google XML Sitemaps
This plugin will generate a special XML sitemap which will help search engines like Google, Yahoo, Bing and Ask.com to better index your blog.

HeadSpace2
Meta-data manager on steroids, allowing complete control over all SEO needs such as keywords/tags, titles, description, stylesheets, and many many other goodies.

Next Page
Provides shortcodes and template tags for next/previous navigation in pages.

Page Flip Image Gallery
FlippingBook Photo gallery plugin with page flip effects.

Page Tagger
Enables tagging for pages. PHP 5 required.

Photo Dropper
Lets you add Creative commons licensed Photos to Your Posts from Flickr. By activating this plugin you agree to be fully responsbile for adhering to Creative Commons licenses for all photos you post to your blog.

Useful 404′s
Create more useful 404 error pages, including email notifications for bad links. See http://www.alistapart.com/articles/amoreuseful404 for the inspiration behind this plugin.