WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was wondering how to create a list of categories name and ids for Wordpress Bookmarks such as get_all_category_ids for post.

I tried using the get_bookmarks, but the category does not appear in it.


Based on advice from @Mridul-Aggarwal, I wrote code that might be useful:

    $tautan=get_terms('link_category');//get links category object

    foreach($tautan as $isi) {
        $html.="\t<li>$id - $nama</li>";

    echo $html;
share|improve this question
It is helpful to provide links for the functions you reference. Usually that means a link to the WordPress Codex or PHP's docs. But anything that clarifies what you have tried or what you are doing could help. – s_ha_dum Nov 22 '12 at 14:23
@s_ha_dum: I wish so, but at the time, I do not understand how to type the code in the edit. :) BTW, thanks for your editing help. – bayuah Nov 22 '12 at 17:35
those functions are all buttons above the edit screen or click the orange "?" on the right. – s_ha_dum Nov 22 '12 at 17:40
up vote 0 down vote accepted

what about get_terms('link_category');?

Once you have the objects, you can use them to get whatever information you like.

share|improve this answer
Thanks, it's work! – bayuah Nov 22 '12 at 17:51

I believe you want wp_list_categories or get_categories. The latter will return an array that you can use to create and format links however your like.

share|improve this answer
But these only shows the category of the post, not bookmarks. – bayuah Nov 22 '12 at 17:51

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.