• Resolved cortex123

    (@cortex123)


    Hi,

    I currently have this piece of code:

    <?php query_posts(array('showposts' => 4, 'cat' => $cat )); ?>

    it’s at the homepage and it shows 4 posts for all categories. But there is one category that want to show 8 posts instead. What can I do to have one special category with 8 posts showing and the remaining ones with 4 posts?

    thanks in advance

Viewing 2 replies - 1 through 2 (of 2 total)
  • You would need to use 2 queries and loops – the first using query_posts() and displaying (say) 8 posts from a specific category. The second would need to use WP_Query() and display 4 posts form every category except the previously displayed one.

    Thread Starter cortex123

    (@cortex123)

    thanks for your answer, I’ve managed to make it happen ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘showposts with a tweak’ is closed to new replies.