I re-pasted it in, but still just an error. Here is the error:
WordPress database error: [You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'AS cat_id, name AS cat_name FROM INNER JOIN ON .term_id = .te]
SELECT DISTINCT .term_id AS cat_id, name AS cat_name FROM INNER JOIN ON .term_id = .term_id AND .taxonomy = 'link_category'
Here is what the plugin has now:
<?php
/*
Plugin Name: Categorical Links Page
Plugin URI: http://www.alucinari.net/wordpress
Description: Output links seperated by categories onto a static page (Based on Links Page (http://www.asymptomatic.net/wp-hacks) by Owen Winkler.)
Version: 1.1
Author: Jeremy Albrecht
Author URI: http://www.alucinari.net/
*/
?>
<?php
/*
INSTRUCTIONS
------------
1. Upload this file into your wp-content/plugins directory.
2. Activate the Links Page with Categories plugin in your WordPress admin panel.
3. Create a new static page.
4. Add <!--catlinkspage--> to the static page content where you want the links
to appear.
Enjoy!
*/
?>
<?php
define('LINK_USE_UL', false);
function catlinks_page_callback()
{
global $wpdb;
$output = '';
$linkcats = $wpdb->get_results("SELECT DISTINCT $wpdb->terms.term_id AS cat_id, name AS cat_name FROM $wpdb->terms INNER JOIN $wpdb->term_taxonomy ON $wpdb->terms.term_id = $wpdb->term_taxonomy.term_id AND $wpdb->term_taxonomy.taxonomy = 'link_category'");
$output .= '<div class="catlinkspage">';
foreach($linkcats as $cat)
{
$links = get_links($cat->cat_id, '<li class="clplink">', '</li>', '<br /> >> ', true, 'name', true, false, -1, true, false);
if($links)
{
$output .= '<h2 class="clplinkcategory">' . $cat->cat_name . '</h2> ';
$output .= '<ul class="clplinklist"> ';
$output .= $links;
$output .= '</ul> ';
}
else
{
$output .= '';
}
}
$output .= '</div>';
return $output;
}
function catlinks_page($content)
{
if ( strpos($content, '<!--catlinkspage-->') !== false ) $content = catlinks_page_callback();
return $content;
}
add_filter('the_content', 'catlinks_page');
?>