WordPress 2.1 get_links() Bug?

By | January 31, 2007

I just upgraded to WordPress 2.1 (improvements to the editor on the “Write Post” page alone are worth the time spent on the upgrade) and have run into an issue with get_links(). The first argument to get_links is the category id. If you don’t specify an argument or pass in -1, all links are returned.

I manage the Tutorials, Friends, and Blogroll sections of my sidebar using get_links() to return link info. After upgrading, this stopped working. If I pass in -1, all links are returned, so the functionality isn’t totally broken. But, specify the integer value for the category id no longer seems to work.

2 thoughts on “WordPress 2.1 get_links() Bug?

  1. Jani

    Came here a-Googling and then found a possible solution for this elsewhere, thought I’d share it here: it looks like the upgrade changes links’/blogroll categories’ IDs, so replacing the old IDs with new ones (e.g. from the blogroll management view) might help. At least it did so for me!

    Reply
  2. Robert Post author

    Thanks so much for the info. I’ll check it out. I ended up just collapsing the separate drop down sections into a single Blogroll section with subdividers. I also pulled my tutorial links out of my WordPress links. I thought it would be easier to add new tutorials if I managed it that way, but I never found the time to write said tutorials.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *