Double category order
-
Hello,
Let’s say I have multiple posts in category ‘items’ and some of those posts are also in category ‘special’. All of them are sorted by date.
Is there any way to sort those posts so posts in category ‘special’ would be on top of other ‘items’?
I’ve tried something like this:
<?php while (have_posts()) : the_post(); ?> <?php if ( in_category('special')) : ?> ... <?php endif; endwhile; ?> <?php while (have_posts()) : the_post(); ?> <?php if ( ! in_category('special')) : ?> ... <?php endif; endwhile; ?>
But it works weird with WP-PageNavi (‘special items’ go to the last page).
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Double category order’ is closed to new replies.