Display images with wp_list_categories
-
Hi,
I have this function with is working fine, because i will list subcategories in category page, if they exist.
function add_subcategory_list() { if( is_category() ) { $cat_id = get_query_var('cat'); $cat_ancestors = array(); $cat_ancestors[] = $cat_id; do { $cat_id = get_category($cat_id); $cat_id = $cat_id->parent; $cat_ancestors[] = $cat_id; } while ($cat_id); $cat_ancestors = array_reverse( $cat_ancestors ); $top_cat = $cat_ancestors[1]; wp_list_categories('title_li=&hide_empty=0&show_option_none=&child_of=' . $top_cat); } }How can I implement the images?
Thanks!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Display images with wp_list_categories’ is closed to new replies.