[Plugin: Taxonomy Images] get child category image
-
i’m new in wp.
i’m using Category template hierarchy (http://wordpress.org/extend/plugins/category-template-hierarchy/) for using parent-category.phpmy parent-category.php
<section id="list"> <?php display_sub_categories(); ?> </section>
my function.php
function display_sub_categories() { $image_url = apply_filters( 'taxonomy-images-queried-term-image-url', '' ); $current_cat = get_query_var('cat'); $args = array('child_of'=>$current_cat); $categories = get_categories($args); if (!empty($categories)) { echo ' <ul>'; foreach ($categories as $category) { echo ' <li><a>slug.'">'. $category->name .'</a><img src="'.$image_url.'" /></li> '; } echo '</ul> '; } else { // fallback for when no subcategories are available } }
but this line ‘
$image_url = apply_filters( 'taxonomy-images-queried-term-image-url', '' );
‘ showing current category image. how can i change this line to get child category image.please help me, i’m not well in php,wordpress,english.
thanks in advance.
Viewing 9 replies - 1 through 9 (of 9 total)
Viewing 9 replies - 1 through 9 (of 9 total)
- The topic ‘[Plugin: Taxonomy Images] get child category image’ is closed to new replies.