Support » Fixing WordPress » wp_list_bookmarks, category_name and hyphens

  • Resolved germanny

    (@germanny)


    Hi:

    I have some Link Category names, some of which are hyphenated. So let’s say I do this: wp_list_bookmarks(‘category_name=blah’);. This works just fine. But if I have this: wp_list_bookmarks(‘category_name=blah-blah’);, this does not work. I checked the database to make sure the “slug” field actually has the hyphen in it, and so it does. But no links with this category name, or any category name that is hyphenated, are returned. Any thoughts?

    Thanks,
    Jen

Viewing 2 replies - 1 through 2 (of 2 total)
  • And the answer is …

    Because “category_name” is in fact the Category Title, not the slug. I really wish WP was a little more consistent in its naming conventions.

    Hi: Try to replace category_name by cat_name

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘wp_list_bookmarks, category_name and hyphens’ is closed to new replies.