Skip to content

Instantly share code, notes, and snippets.

Created April 1, 2017 10:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/b2e7a8695e906e351b64cb4522315159 to your computer and use it in GitHub Desktop.
Save anonymous/b2e7a8695e906e351b64cb4522315159 to your computer and use it in GitHub Desktop.
<?php
$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(); ?>
</div>
<?php endwhile; ?>
</div>
<?php }?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment