Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_shortcode('caticons_listing','bm_caticons_listing');
- function bm_caticons_listing($atts) {
- extract( shortcode_atts( array(
- 'include' => '',
- 'exclude' =>'',
- ), $atts ) );
- $listing_code = '';
- if ($atts['include']) $include = "&include=".$atts['include'];
- if ($atts['exclude']) $include = "&exclude=".$atts['exclude'];
- foreach(get_categories("orderby=name&order=ASC&hide_empty=0".$include.$exclude) as $category) {
- $listing_code .= $category->cat_name.' '.get_cat_icon("echo=false&cat=".$category->cat_ID);
- }
- $listing_code .= "";
- return $listing_code;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement