您可以使用以下方法来代替每次使用都不正常的taxonomy_term_load():
function get_tag_name($tid) {
$query = db_select('taxonomy_term_data', 't');
$query
->condition('t.tid', $tid, '=')
->fields('t', array('tid', 'name'));
$result = $query->execute();
foreach ($result as $row) {
return $row->name;
}
}
Notice: Trying to get property of non-object in include() (line 79 of {my site}/templates/page.tpl.php)
并且无法正常工作。:(