[Resolved] How to show only child_of for parent?
My archives pages are only showing one child category at a time. I’d rather have them show all the child categories within the parent category.
I found the “child_of” parameter, but not sure where to place it in my code. Each child category only has one post assigned to it. The reasoning is as follows: browse by brand > brands > product.
My code is:
<ul class="wpn_archives"> <?php while (have_posts()) : the_post(); ?> <li> <img class="wpn_thumb" src="<?php echo get_post_meta($post->ID, "thumbnail", true); ?>" alt="" /> <!--<a class="wpn_comments" href="<?php the_permalink(); ?>#comments"><?php comments_number('0', '1', '%'); ?></a>--> <h2><a href="<?php the_permalink(); ?>"><?php category_title(get_the_title()); ?></a></h2> <span>Product inventory is continuously updated</span> <!--<span>Published on <?php the_time('l, F j, Y') ?> by <?php the_author_posts_link() ?></span>--> <!--<?php wpn_content_show(370); ?>--> <a href="<?php the_permalink(); ?>">Read More »</a> </li> <?php endwhile; ?>
The “by brand” is only one such category, so I need all parent categories to show their children.
Any help is very much appreciated.
- The topic ‘[Resolved] How to show only child_of for parent?’ is closed to new replies.