Warning: implode() [function.implode]: Invalid arguments passed

前端 未结 4 1528
伪装坚强ぢ
伪装坚强ぢ 2021-02-01 19:23

I\'m getting the error below...

Warning: implode() [function.implode]: Invalid arguments passed in \\wp-content/themes/mytheme/functions.php on line 1335

at...

4条回答
  •  时光取名叫无心
    2021-02-01 20:04

    function my_get_tags_sitemap(){
        if ( !function_exists('wp_tag_cloud') || get_option('cb2_noposttags')) return;
        $unlinkTags = get_option('cb2_unlinkTags'); 
        echo '

    Tags

    '; $ret = []; // here you need to add array which you call inside implode function if($unlinkTags) { $tags = get_tags(); foreach ($tags as $tag){ $ret[]= $tag->name; } //ERROR OCCURS HERE echo implode(', ', $ret); } else { wp_tag_cloud('separator=, &smallest=11&largest=11'); } echo '
    '; }

提交回复
热议问题