Skip to content

Instantly share code, notes, and snippets.

Created Apr 1, 2017
What would you like to do?
$sub_categories = get_categories("child_of=14&orderby=ID");
foreach ($sub_categories as $cat) { ?>
<div class="genre_subcat">
<?php query_posts("cat=$cat->cat_ID&showposts=-1&order=ASC&orderby=name"); ?>
<h2><?php single_cat_title(); ?></h2>
<small><?php echo category_description($cat->cat_ID); ?></small>
<?php while (have_posts()) : the_post(); ?>
<div class="post">
<h3><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to
<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3>
<p class="postdate"><?php the_time('F jS, Y') ?></p>
<?php the_content(); ?>
<?php endwhile; ?>
<?php }?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment