所以我使用get_the_author_meta()函数来访问它。 当它在wp_footer动作中触发时,它可以很好地工作,但在wp_head中触发时,它会出现空洞。= get_the_author_meta('nickname'); #This is the element that works in wp_footer but not in wp_head,"\n";}
add
换句话说,如果author元数据facebook_handle不存在,我希望隐藏该facebook_icon 我使用了下面的代码,但它似乎隐藏了图标,而不管元数据是否存在。任何帮助都将不胜感激。Hide Facebook icon if no facebook_handle
}
add_action( 'wp_head
> Deprecated: get_the_author_lastname started deprecated since version 2.8.0!Use get_the_author_meta ('last_name'). in /home/dgrou/wp-includes/functions.php on line 4861 Mike,Deprecated: get_the_author_firstna