WP wp_list_authors ломается вывод на optioncount
Пробую вывести всех пользователей у которых есть опубликованные посты через стандартную функцию Wordpress wp_list_authors и отсортировать их по количеству этих постов.
<ol class="authors_list">
<?php
$args = array(
'orderby' => 'post_count',
'show_fullname' => true,
'optioncount' => true
);
wp_list_authors($args); ?>
</ol>
Но вывод ломается с критической ошибкой при указании параметра optioncount Может кто-то подсказать что не так? *И пользователи и опубликованные посты есть.
Ошибка
Fatal error: Uncaught Error: Object of class stdClass could not be converted to string in D:\OSPanel\domains\test.loc\wp-includes\author-template.php:568 Stack trace: #0 D:\OSPanel\domains\test.loc\wp-content\themes\test_2022\page-author.php(15): wp_list_authors() #1 D:\OSPanel\domains\test.loc\wp-includes\template-loader.php(106): include('D:\\OSPanel\\doma...') #2 D:\OSPanel\domains\test.loc\wp-blog-header.php(19): require_once('D:\\OSPanel\\doma...') #3 D:\OSPanel\domains\test.loc\index.php(17): require('D:\\OSPanel\\doma...') #4 {main} thrown in D:\OSPanel\domains\test.loc\wp-includes\author-template.php on line 568