• salmanpatnee

    (@salmanpatnee)


    My question is so simple but, i cant found any solution. Basically i want to show first level sub-cat under parent page i’m using category images plugin here is the code `<?php

    $args = array(
    ‘parent’ => 0,
    );

    foreach (get_categories($args) as $cat):

    if (function_exists(‘z_taxonomy_image_url’) && z_taxonomy_image_url($cat->term_id) != null ): ?>
    <div class=”col-md-3 col-xs-3 cat-index”>
    <a href=”<?php echo get_category_link( $cat->term_id); ?>”
    title=”<?php echo $cat->name; ?>”>
    <figure class=”cat-img”>
    <img class=”img-thumbnail” src=”<?php echo z_taxonomy_image_url($cat->term_id); ?>” alt=””>
    <figcaption><?php echo $cat->name; ?></figcaption>
    </figure>
    </a>
    </div>

    <?php endif; endforeach; ?>`

  • The topic ‘Show all first level sub-categories on its parent's page’ is closed to new replies.