• The setup:

    ISSUE 218 (category/issue/218) which has 5 posts.

    ISSUE COLUMNS
    – ESSAY (category/column/essay) which has 2 posts
    – MOVIES (category/column/movies) which has 3 posts
    – MUSIC (category/column/music) which has 1 posts

    I am creating Category template which would list all my posts inside issue 218 and sort them by issue columns.

    I have lousy programmers skillz, and would need assistance here. So far I have this piece of code (found randomly on the Internet):

    <?php $categories = get_categories('child_of=19'); foreach ($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">
    	<ul>
    	<li><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>" class="article-title"><?php the_title(); ?></a>,
    	<span class="article-author"><?php the_author ?></span></li>
    	</div>
    	<?php endwhile; ?>
    	</div>
    <?php } ?>

    Which gets me results by the Issue column category, but it gets them ALL, I need only posts that are in issue/218.

    I have two “trees” of categories, and need to merge. Am I using wrong these queries? If anyone has any helpful examples I would be very grateful.

    Thank you

    Luka

    P.S. You can see one of the test results here: h**p://zarez.vidosh.com/category/broj/218

  • The topic ‘Listing posts by categorie IN a specific category not it's parent’ is closed to new replies.