Forums

[resolved] How-to in 2.6.1.: Link listing by categories (3 posts)

  1. steinhaeuser
    Member
    Posted 3 years ago #

    Hi friends of WP,

    since I successfully upgrade my blogs to 2.6.1 there is one script in my sidebar, that doesn't work anymore:

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

    I suppose that something in the first lines is resulting in a empty list. Thus, nothing is listed at all...

    Any hints? Thanks!

    CU, Steffen

  2. steinhaeuser
    Member
    Posted 3 years ago #

    I hate solving it myself. However, it trains oneself to stay uptodate 8-)
    `
    <?php wp_list_bookmarks('title_before=<b>&title_after=</b>'); ?>
    '

    CU on the next prob, Steffen

  3. shorehero
    Member
    Posted 2 years ago #

    Thanks for the help. This fixed the problem.

Topic Closed

This topic has been closed to new replies.

About this Topic