WordPress 2.1 And Blogroll
Today I upgraded to a newer version of WordPress 2.1. And my theme, based on the Dixie Belle theme, showed an error in the sidebar:
-
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 ” at line 1]
-
SELECT cat_id, cat_name FROM
After short looking for a solution i discovered, that from the version 2.1 a table called linkcategories
does not exist anymore. A code to display links in my template relies on that table.
There is a simple solution:
Replace the following code from the sidebar.php
:
-
span style=”color: #ff0000;”>"SELECT cat_id, cat_name FROM $wpdb->linkcategories""linkcat-<?php echo $link_cat->cat_id; ?>"
with the following code:
Yeah, it works… Wait a second, the title of each category (e.g. Blogroll) is not like other headers in the sidebar.
There is an easy way.. the wp_list_bookmarks
method accepts some parameters such as title_before
, title_after
and the theme uses h4
tag for headers.
Well, here is the final solution:
-
span style=”color: #ff0000;”>’title_after=</h4>&title_before=<h4>’
Does it work fine? Look on the right side of this page. ;)
Bye :)