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 have a problem with a website of mine, I was hoping you can help me.

I added the offset option to ignore the first couple of posts in the main loop. It does its job, but the navigation got broken. When navigating through older pages (2nd page, 3rd page etc), no matter what page I am on, I always get the first page posts.

This is the code I edited:

<?php query_posts("cat=-27,-28&paged=$page&posts_per_page=10&offset=5"); ?>

Can you please let me know how to fix this?

Thanks a lot!

share|improve this question
2  
Please read this. –  toscho Apr 25 '13 at 16:51
1  
Where are you setting $page? Dump the variable to the screen and ensure it contains the correct value. –  t31os Apr 25 '13 at 16:57
    
Thanks for your answers. It seems like offset doesn't work with pagination, as the pagination does its own offset thing. Anyway, this helped me and fixed my problem: weblogtoolscollection.com/archives/2008/06/19/… –  watt Apr 26 '13 at 8:27

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.