Get Sub Categories through Query Posts
-
Hi there,
I am trying to create a custom page whereby I can create a loop that just brings in category 10. I am doing this with the code below:
<?php query_posts('cat=7'); ?> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> //do stuff here <?php endwhile; else: ?> <p><?php _e('Sorry, no posts matched your criteria.'); ?></p> ?php endif; ?>
Inside this loop (do stuff here) I want a query that will get all the sub catefories of category 10 and display each of them in a seperate div, then I can style them. I actually want to pull a custom field once I have queried them so that I can display them something like this page:
https://www.ribbweb.org/ict/?cat=19
I am just not sure of the code to go in the do stuff here part. Any ideas anyone. Much appreciated.
Thanks
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Get Sub Categories through Query Posts’ is closed to new replies.