mam taki problem znalazłem gdzieś na internecie coś takiego
function get_last_name($name) { } function last_name_compare($a, $b) { } function autorzy_lista() { } add_shortcode( 'autorzy_lista', 'autorzy_lista' );
Uruchamiam to shortcodem i wyświetla mi błąd
Warning: usort() expects parameter 1 to be array, null given in /home/public_html/wp-content/themes/segregacja/functions.php on line 894
Zbytnio się nie znam. gdy ustawiłem opcję sorotwania taką
function contributors() { wp_list_authors('show_fullname=1&orderby=name&exclude_admin=1&exclude='); } add_shortcode( 'spis', 'contributors' );
która odwołuje się do tej
function wp_list_authors( $args = '' ) { 'orderby' => 'name', 'order' => 'ASC', 'number' => '', 'optioncount' => false, 'exclude_admin' => true, 'show_fullname' => false, 'hide_empty' => true, 'feed' => '', 'feed_image' => '', 'feed_type' => '', 'echo' => true, 'style' => 'list', 'html' => true, 'exclude' => '', 'include' => '' );
I wolał bym tej nie ruszać bo ona jest w silniku wp a zrobić nową tylko tamta wyświetla błąd :/ czy może mi ktoś pomóc albo nakierować ? ew może inne sortowanie