valibuk.net

A place for opinions and notes of a valibuk.

WordPress 2.1 And Blogroll

Tagged with: — ondrej at 11:55 pm on Sunday, February 4, 2007

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:

  1. 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]
  2. 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:

  1. span style=”color: #ff0000;”>"SELECT cat_id, cat_name FROM $wpdb->linkcategories""linkcat-<?php echo $link_cat->cat_id; ?>"

with the following code:

  1.  

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:

  1. span style=”color: #ff0000;”>’title_after=</h4>&title_before=<h4>’

Does it work fine? Look on the right side of this page. ;)

Bye :)

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • DZone
  • Digg
  • Reddit
  • Technorati
  • Furl
  • NewsVine
  • Slashdot
  • Ma.gnolia
  • StumbleUpon

3 Comments »

Comment by Brian

April 6, 2007 @ 9:41 pm

thanks man, this worked like a charm!!!!!!

Comment by ondrej

April 7, 2007 @ 2:39 am

you are welcome :)

Comment by Brad Barrish

June 21, 2007 @ 1:26 am

Wow, you just solved a big problem I was having with the Kiss theme… well, kind of. I can’t seem to figure out what to do to suppress the title completely as I list it earlier in the div (if that makes sense). I’m more of a hack than a real programmer.

RSS feed for comments on this post. TrackBack URI

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Comment Preview


commercial break :)

Make an account on slicehost.com -- a really good hosting where you have your own virtual machine. I installed Gentoo there = I like it very much ;)