Blogroll links sorted by category in a table
I would like to create a blogroll page with a table where the links would be in the left table division and the description in the right division. So far, everything works...
Where it becomes tricky is that I would like a table for each link category. Unfortunately, the sql table links doesn't have a column link_category, it is located in taxonomy terms table.
I have tried many ways but I just can't get the right query. You can see my code below. It outputs the links and descriptions in a table, you can see it in action here: http://www.thebrutes.org/links/
$links = $wpdb-get_results("SELECT * FROM $wpdb-links ORDER BY link_name ASC");
echo "table";
foreach ($links as $link) {
$linkurl=$link-link_url;
$linkdesc=$link-link_description;
$linkname=$link-link_name;
echo "trtda href='$linkurl' target='_blank'$linkname/a/td";
echo "td$linkdesc/td/tr"; }
echo "/table";
So, if anyone would know a way to create a separate table for each link category created in my bookmarks, it would be greatly appreciated.
Or maybe is there an easier way but I haven't figured out how to use wp_list_bookmarks to output the links and their descriptions in separate table divisions...