Some ‘Category’ questions
-
Hi folks
Some small questions:1. How do I get the 2nd and 3th last entry?
<?php $cat_posts = new WP_Query('category_name=Basecamp&orderby=post_date&posts_per_page=3'); ?> <?php if($cat_posts->have_posts()) : ?><?php while($cat_posts->have_posts()) : $cat_posts->the_post(); ?> <?php endwhile; ?> <?php endif; ?>
This gives me the last 3 posts, and I actually need the 2 previous ones
————————
2. Using the same kind of code, how can I get all categories listed except one that’s called Twitter (in my case)
Thanks in advance
Jelle
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Some ‘Category’ questions’ is closed to new replies.