Skip to content

Instantly share code, notes, and snippets.

@arelthia
Created April 10, 2013 03:14
Show Gist options
  • Save arelthia/5351466 to your computer and use it in GitHub Desktop.
Save arelthia/5351466 to your computer and use it in GitHub Desktop.
//list terms in a given taxonomy [ppshowtax='' orderby='name' 'style=' ' show_count = '' pad_counts = ' ' hierarchical = ' ' hide_empty= ' ' title_li='View Lessons' title_li=''] //list terms in a given taxonomy [ppshowtax='' orderby='name' 'style=' ' show_count = '' pad_counts = ' ' hierarchical = ' ' hide_empty= ' ' title_li='View Lessons' titl…
//list terms in a given taxonomy [ppshowtax='' orderby='name' 'style=' ' show_count = '' pad_counts = ' ' hierarchical = ' ' hide_empty= ' ' title_li='View Lessons' title_li='']
function pp_show_taxs($atts){
extract( shortcode_atts( array(
'taxonomy' => 'category',
'orderby' => 'name',
'style' => 'list',
'show_count' => 0, // 1 for yes, 0 for no
'pad_counts' => 0, // 1 for yes, 0 for no
'hierarchical' => 1, // 1 for yes, 0 for no
'hide_empty' => 0,
'title_li' => ' '
), $atts ) );
$html = wp_list_categories( $atts );
return $html;
}
add_shortcode( 'ppshowtax', 'pp_show_taxs');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment