Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am trying to offset 1 post in my main loop, I have tried a few things Like query_posts() etc etc, and i can get the offset to work but my pagination ends up not working , I am using the PagNavi plug in , Any Help would be awesome , the Code is pretty generic , thanks again!

<?php if (have_posts()) : ?>
<?php query_posts('offset=1');?>
<?php while (have_posts()) : the_post(); ?>

//Content

<?php endwhile; else: ?>
<?php _e('Sorry, no posts matched your criteria.'); ?>
<?php endif; ?>
share|improve this question
add comment

1 Answer

Because of query mechanics either $paged or $offset is used, but not both at the same time. Basically if you want custom offset then it is assumed that you do not want pagination.

You would probably need to hook into post_limits and change generated LIMIT SQL to adjust offset, unless there is an easier way that I am missing.

share|improve this answer
    
thank you for the feed back! was not aware of that, Ill keep searching –  The Fragile Machine Oct 11 '11 at 21:48
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.