Through a series of specific requirements, I find myself needing to link to a custom taxonomy category using its term id...
I've got this - which displays a link to all taxonomies - I wish to change it so it only displays a link to the taxonomy with the term id dynamically pulled from a custom field I'm using.
$taxonomy = 'event-categories';
$terms = get_terms($taxonomy);
if ($terms) {
foreach($terms as $term) {
echo '<li><a href="http:/mysite.com/events/categories/project-events/' . $term->slug . '">' . $term->name .'</a></li>';
}
};
essentiall I need "link_to_taxonomy_category(x)" where x = term_id
Thanks
'; foreach ($terms as $term) { echo '- '.$term->name.'
';
}
echo '
';` and got the following error "Catchable fatal error: Object of class WP_Error could not be converted to string in..." – JorgeLuisBorges Apr 11 '12 at 13:08'; foreach ($terms as $term) { echo '- '.$term->name.'
'; } echo '
';` – gradyetc Apr 11 '12 at 14:25