Support » Fixing WordPress » category_name parameter not working in wp_list_bookmarks?

  • Resolved klunko

    (@klunko)


    I just upgraded to 2.1 and, like others here, I’m having trouble with the new wp_list_bookmarks replacement for wp_get_linksbyname. What I need to is retrieve a list of bookmarks using a category name (NOT integer). The codex for wp_list_bookmarks mentions a parameter called category_name that should be able to do this. So far I’ve been unable to get this work at all. I’ve tried:

    wp_list_bookmarks(‘category_name=name’)

    and

    $catname=’name’;
    wp_list_bookmarks(‘category_name=$catname’)

    Is it simply not functioning?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    No, it’s not you. The category_name parameter does not work at this time. I think it’s there for future reference, when certain other upgrades go into place.

    The only way to limit categories is with the “category” parameter, which takes a numeric input.

    Thread Starter klunko

    (@klunko)

    Thanks Otto. So is there really no way to get links by category name right now? Seems weird that WordPress would put out a new version without that basic functionality…

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    You could call get_cat_ID(‘Name’) to get the category ID, and then call it with that ID. At the moment, that’s the best available.

    Thread Starter klunko

    (@klunko)

    Thanks, that helps.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘category_name parameter not working in wp_list_bookmarks?’ is closed to new replies.