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 noticed that if I have a query where posts_per_page are set to 4, any (image) gallery that belongs to one of those posts will too have only 4 items (although when I create the gallery from Add new post the gallery has 10 images).

How can I fix this?

share|improve this question

1 Answer 1

You need to post the query code of both the post query and the gallery query; no one can really make a guess otherwise.

You can try using <?php wp_reset_query(); ?> after the post query to force a reset.

See http://codex.wordpress.org/Function_Reference/wp_reset_query

share|improve this answer
    
But I don't really understand why a Gallery needs a query. After what may I reset the query? I would like every item in the gallery to appear, no matter there are 4 or 40 images in the gallery...Thanks –  Alvaro Aug 15 '12 at 0:10
    
I'm just guessing at the problem; that's all I can do. You haven't posted code or anything to work with. –  songdogtech Aug 15 '12 at 4:17

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.