• Hi all, hope some of you can help me with this loop-related challenge I’m facing! I’ve tried different solutions but I don’t seem to be able to crack it on my own this time 🙁

    I’m using a theme that divides post categories in 2 types: “Gallery” or “Blog”. I have about 5 categories that belong to the type “Gallery” and 2 that belong to the type “Blog”. Through a loop in the category.php file, all posts associated to a Gallery-category work and look a certain way (like a photo gallery, see: http://www.alegruzza.com/category/dolomitic-environment/), while all the posts associated to a Blog-category work and look a different way (like a blog listing, see http://www.alegruzza.com/category/news/).

    This works just fine. The problem is that both types of post categories will display the same number of posts, i.e. the number (60) I’ve set in the Reading Settings (Settings > Reading > Blog pages show at most..), while I need to specify a different, smaller number (e.g. 5) for the posts belonging to the Blog categories.

    Here is the code of the category.php page: https://gist.github.com/anonymous/dcf5b429611ad4f4da16

    Any help is much appreciated!
    Thanks,
    Oriana

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘How to limit the number of displayed post within a complex loop’ is closed to new replies.