display a random post thumbnail from a random category
All you need to do is to add another query in your code: function categorie_shortcode_callback() { $html=””; $categories = get_categories( array( // ‘type’ => ‘carte’, <- THERE IS NO ATTRIBUTE CALLED type FOR get_categories, SO REMOVE THAT ‘taxonomy’ => ‘carte-category’, ‘parent’ => 0 )); shuffle( $categories); // you also don’t need to loop through that … Read more