Offset 2 categories
-
Hi there. I have 2 sections on my site, section one displays 2 posts. The latest 2 post from 2 different categories(Video and News).
I’m calling those latest post like this:
<?php if (have_posts()) : query_posts('category_name=News&showposts=1'); while (have_posts()) : the_post(); ?>
<?php if (have_posts()) : query_posts('category_name=Video&showposts=1'); while (have_posts()) : the_post(); ?>
In section two I have integrated the loop from a theme. But I want that second loop to start at an offset of 1 for each category. So that the latest post for ‘Video’ and the latest post for ‘News’ won’t be called by the second loop as this creates double blogposts on my page.
I can’t seem to get this working. Can someone point me in the right direction.
I tried
query_posts('category_name=News,Video&offset=1')
for the second loop but this doesn’t work.
- The topic ‘Offset 2 categories’ is closed to new replies.