WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] wp_get_links stopped working when I upgraded to 2.1.3 (6 posts)

  1. ampersand
    Member
    Posted 7 years ago #

    I upgraded to 2.1.3 earlier today. For the most part the upgrade is great; however in my sidebar, where there had previously been lists of links sorted by link category, there is now nothing.

    Here's the call I'm using, to list just one category at a time (which is necessary for my blog's design):

    <li id="Alas-Related Links"><h2>Alas-Related Links</h2>
    <ul><?php wp_get_links(22); ?></ul>
    </li>

    My blog can be viewed at http://www.amptoons.com/blog . I'd appreciate any help or suggestions.

  2. MichaelH
    Member
    Posted 7 years ago #

    Try using the template tag, wp_list_bookmarks instead of wp_get_links.

    <?php wp_list_bookmarks('category=22'); ?>

  3. ampersand
    Member
    Posted 7 years ago #

    I just tried that, and thank you for the suggestion.

    But I'm afraid it didn't change anything. :-(

  4. MichaelH
    Member
    Posted 7 years ago #

    I see your Atlas related links--what is wrong?

  5. ampersand
    Member
    Posted 7 years ago #

    I figured out what the problem was; for some reason, when I updated the version of WordPress, the numbers assigned to each category were changed. So writing

    <?php wp_list_bookmarks('category=22'); ?>

    Didn't work because there no longer was a category #22; it had been renumbered and was now category 79. Once I noticed that the numbers had changed, and put in the correct numbers, then it worked fine.

  6. rudolf45
    Member
    Posted 7 years ago #

    It happens because in 2.1 the post categories and link categories are merged in one single categories table, so they get renumbered...

Topic Closed

This topic has been closed to new replies.

About this Topic