# Showing all posts from different folders (merging collections)

**URL:** <https://forum.getkirby.com/t/showing-all-posts-from-different-folders-merging-collections/1679>\
**Category:** Questions\
**Tags:** v2\
**Created:** [July 23, 2015, 8:04pm UTC](https://forum.getkirby.com/t/showing-all-posts-from-different-folders-merging-collections/1679 "2015-07-23T20:04:37Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [July 24, 2015, 12:03pm UTC](https://forum.getkirby.com/t/showing-all-posts-from-different-folders-merging-collections/1679/8 "2015-07-24T12:03:07Z")

</div>

Have you turned on debugging in your config.php? What is the error?

One idea is that you can’t just use the string syntax “sortBy” like above, try putting it on a different line or put the new Pages thingy in parenthesis before adding sortBy().

```php
$posts = new Pages(array($posts_a, $posts_b)); 
$posts = $posts->sortBy('date', 'desc');

```

---

_[View the full topic](https://forum.getkirby.com/t/showing-all-posts-from-different-folders-merging-collections/1679)._
