Hi everyone,
I'm trying to do some custom formatting for WordPress' Links (aka bookmark links). Using get_bookmarks() I can do most of what I want, but I can't get it to give me the name of each Link Category.
According to The Codex I thought I should be able to get the category title out of any bookmark link (see Return Values). But it's always blank. So I tried the following code:
$bookmarks = get_bookmarks();
foreach($bookmarks as $bm) {
echo $bm->link_id . ' id';
echo $bm->link_url . ' url';
echo $bm->link_name . ' name';
echo $bm->link_image . ' image';
echo $bm->link_target . ' target';
echo $bm->link_category . ' category';
echo $bm->link_description . ' description';
echo $bm->link_visible . ' visible';
echo $bm->link_owner . ' owner';
echo $bm->link_rating . ' rating';
echo $bm->link_updated . ' updated';
echo $bm->link_rel . ' rel';
echo $bm->link_notes . ' notes';
echo $bm->link_rss . 'rss';
}
And nothing shows up for link_category. Same if I run print_r on $bm, link_category doesn't appear in the array at all.
Can anyone help me figure out what's going on? Am I misinterpreting how to use get_bookmarks()? I'm no expert when it comes to using arrays.
Thanks!