WordPress.org

Support

Support » How-To and Troubleshooting » Multiple category posts

Multiple category posts

  • In my site i have created a page template to show only a specific category post, but this post is also attached with multiple category.. Now when we add a code to show related category post it shows those category posts which are top in alphabetic order.

    Like my category is ‘Poster’ and related post is also attached with ‘Art’ so it’s shows Art category name and post on that post along with it’s category name.

    How could i fix it..
    I have tried:
    —– ————- ———
    <?php
    uery_posts(‘cat=4&showposts=27’); ?>
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <?php endwhile; ?>
    <?php endif; ?>
    ——— ———— ——-
    and

    <?php

    $category_query=new WP_Query(array(‘category_name’=> ‘Poster’,’showposts’=>’47’,’order’=>’desc’));?>
    <?php while($category_query->have_posts()):
    $category_query->the_post();
    ?>
    <?php endwhile; ?> code but result are same.
    Please suggest me..

  • The topic ‘Multiple category posts’ is closed to new replies.
Skip to toolbar