WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] wp_list_bookmarks, category_name and hyphens (3 posts)

  1. germanny
    Member
    Posted 5 years ago #

    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

  2. germanny
    Member
    Posted 5 years ago #

    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.

  3. Marlimant
    Member
    Posted 4 years ago #

    Hi: Try to replace category_name by cat_name

Topic Closed

This topic has been closed to new replies.

About this Topic