1
votes

It's possible parent categories show subcategories list (name,image,description)

Example

Parent Category:

  • Subcategory name 1.1(Title)
    Subcategory image
    Subcategory description

  • Subcategory name 1.2(Title)
    Subcategory image
    Subcategory description

Thanks

2

2 Answers

3
votes

I have solved this. Please find the code given below,

<?php $this_category = get_category($cat); ?>   

<ul class="product_list">
    <?php
    $id = get_query_var('cat');
    $args = array(  'parent' => $id );
    foreach (get_categories($args) as $cat) : ?>

    <li>
        <a href="<?php echo get_category_link($cat->term_id); ?>"><img src="<?php echo z_taxonomy_image_url($cat->term_id); ?>" /></a>
        <a href="<?php echo get_category_link($cat->term_id); ?>"><?php echo $cat->cat_name; ?></a>
        <p><?php echo $cat->description; ?></p>

    </li>

    <?php endforeach; ?>
</ul>

Thanks,
Vino

1
votes

Yes

<?php wp_list_categories('child_of=parent_cat_id'); ?>

Referance This