Skip to content

Instantly share code, notes, and snippets.

Created Jun 23, 2016
What would you like to do?
/* Erzeugt eine Kategorieliste mit den RSS-Feed-Adressen der Kategorien */
function tb_categories_with_feed() {
$args = array(
'orderby' => 'name',
'feed' => 'RSS',
'echo' => false,
'title_li' => '',
$string .= '<ul>';
$string .= wp_list_categories($args);
$string .= '</ul>';
return $string;
// Shortcode erstellen
add_shortcode('categories-feed', 'tb_categories_with_feed');
// Filter hinzufügen, der die Shortcodes auch in Text-Widgets anzeigen lässt.
add_filter('widget_text', 'do_shortcode');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment