【debug】wordpress使用the_author_meta(‘description’)代替the_author_description

【debug】wordpress使用the_author_meta('description')代替the_author_description

在使用query_posts输出首页热门文章排序,会出现最新的置顶文章,需要排除,但打开wordpress调试模式后,发现WP给出了如下提示:

Notice: 自2.8.0版本起,已不建议使用,请换用('description')。 in XXXX\XXXX\wp-includes\functions.php on line 3707

用于获取用户描述说明信息,一般常用来获取wordpress文章作者信息.

用法举例

获取作者说明信息:
老旧的代码:

 <?php the_author_description(); ?>

新代码

<?php the_author_meta('description'); ?>