Showing current subcategory
I have problem. <?php query_posts(‘category_name=events&posts_per_page=2&offset=1’); ?> <?php while (have_posts()) : the_post(); ?> <div> <?php $children = get_categories(‘child_of=3’); foreach ($children as $child) { $child = get_category($child); echo $child->cat_name; }; ?> </div> <?php endif; ?> <?php endwhile; ?> I would like to show the current subcategory name from any parent category. With this I only manage to … Read more