WordPress: Get default link category

It took me a long time to find out how to get values from default bookmark category. So now, when all the trouble is past, i’ve decided to share this code with others:

$linkcat = get_term_by(‘id’, get_option(‘default_link_category’), ‘link_category’);
echo $linkcat->name;

You can follow any responses to this entry through the RSS 2.0 feed. You can skip to the end and leave a response. Pinging is currently not allowed.

Pievienot komentāru

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

*