Getting link cat. names to display
-
I updated my WP installation to 1.5.1.3 yesterday and also installed the ShadedGrey theme. I found it didn’t display the links from the links manager, so I did some reading in the codex and found a near perfect solution for my needs, which is
<?php
$link_cats = $wpdb->get_results("SELECT cat_id, cat_name FROM $wpdb->linkcategories");
foreach ($link_cats as $link_cat) {
?>
<h2><?php echo $link_cat->cat_name; ?></h2>
<ul>
<?php get_links('-1', '<li>', '</li>', ' ', FALSE, 'category'); ?>
</ul>
<?php } ?>
The only problem here is, that all links are getting put in all categories, which kind of defeats the purpose of having them in the first place. So what do I need to fix? pretty please? ??
- The topic ‘Getting link cat. names to display’ is closed to new replies.