• Does anyone know what template tag to use to display a list of only link categories – and not the links themselves?

    These three don’t seem to be what is needed…

    # get_links_list
    # wp_get_links
    # get_links

Viewing 4 replies - 1 through 4 (of 4 total)
  • Picked this up somewhere else in the Forum today;

    <?php $link_cats = $wpdb->get_results("SELECT cat_id, cat_name FROM $wpdb->linkcategories"); ?>
    <?php foreach ($link_cats as $link_cat) {?>
    <id="linkcat-<?php echo $link_cat->cat_id; ?>"><h2><?php echo $link_cat->cat_name; ?></h2>
    <?php } ?>

    Thread Starter sodani

    (@sodani)

    Thanks. That seems to work, but do you know how I would make them linked? I want the link categories to be linked to pages that list all of the links.

    I didn’t do this but couldn’t you create a Link that has the URI of a Page in your blog then use those template tags you listed above and put those into a Page Template?

    Thread Starter sodani

    (@sodani)

    You know, I haven’t thought about that. That sounds like it would work. I’ll give it a shot!
    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Display link categories only’ is closed to new replies.