• Resolved tshirtfiend

    (@tshirtfiend)


    Is there any way to change the category ID for link categories?

    I want to display my bookmark categories to display in a certain order, and there doesn’t seem to be a way to do that with the wp_list_bookmarks tag, unless I want to display them alphabetically, or if the IDs were different. The only way I can think of is if I could change the category ID’s so that they will display in the order that I want.

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

    (@otto42)

    www.ads-software.com Admin

    No, you can’t change the ID’s easily.

    However, the category_orderby parameter supports more than the codex would have you believe. You can order by: count, name, slug, term_group, or id. Slug is the most useful one in this case, since the link category slug is more or less useless for anything else.

    Edit your link categories to have slugs with numbers in front of them or something. Then do this:

    wp_list_bookmarks(array(
    'category_orderby'=>'slug',
    'category_order'=>'asc',
    ... other options you want to use ...
    ));

    Thread Starter tshirtfiend

    (@tshirtfiend)

    Awesome! Thanks. Worked like a charm.

    I can understand that changing the ID number might not be an easy thing, but it seems stupid that one of the arguments shouldn’t give you more control over the order.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Change link category IDs’ is closed to new replies.