{"action":"opened","issue":{"url":"https://api.github.com/repos/jarednova/timber/issues/707","labels_url":"https://api.github.com/repos/jarednova/timber/issues/707/labels{/name}","comments_url":"https://api.github.com/repos/jarednova/timber/issues/707/comments","events_url":"https://api.github.com/repos/jarednova/timber/issues/707/events","html_url":"https://github.com/jarednova/timber/issues/707","id":111251697,"number":707,"title":"Pagination not working in category.php when using custom query","user":{"login":"lmartins","id":151981,"avatar_url":"https://avatars.githubusercontent.com/u/151981?v=3","gravatar_id":"","url":"https://api.github.com/users/lmartins","html_url":"https://github.com/lmartins","followers_url":"https://api.github.com/users/lmartins/followers","following_url":"https://api.github.com/users/lmartins/following{/other_user}","gists_url":"https://api.github.com/users/lmartins/gists{/gist_id}","starred_url":"https://api.github.com/users/lmartins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lmartins/subscriptions","organizations_url":"https://api.github.com/users/lmartins/orgs","repos_url":"https://api.github.com/users/lmartins/repos","events_url":"https://api.github.com/users/lmartins/events{/privacy}","received_events_url":"https://api.github.com/users/lmartins/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-13T19:24:24Z","updated_at":"2015-10-13T19:24:24Z","closed_at":null,"body":"Not sure if this is related with #283 , but here's what is happing.\r\n\r\nIm customising the query in order to only retrieve direct children from the current category:\r\n\r\n```php\r\n        $args = array(\r\n            'category__in' => $category->cat_ID,\r\n            );\r\n        $context['posts']           = Timber::get_posts( $args );\r\n        query_posts($args);\r\n```\r\n\r\nIn there im applying the `query_posts` function as described in https://github.com/jarednova/timber/wiki/Pagination\r\n\r\nThe pagination seems to retrieve the correct data when on first page:\r\n```\r\narray (size=2)\r\n  'pages' => \r\n    array (size=3)\r\n      0 => \r\n        array (size=5)\r\n          'class' => string 'page-number page-numbers current' (length=32)\r\n          'title' => string '1' (length=1)\r\n          'text' => string '1' (length=1)\r\n          'name' => string '1' (length=1)\r\n          'current' => boolean true\r\n      1 => \r\n        array (size=5)\r\n          'class' => string 'page-number page-numbers' (length=24)\r\n          'link' => string '//localhost:3000/category/noticias/page/2' (length=53)\r\n          'title' => string '2' (length=1)\r\n          'name' => string '2' (length=1)\r\n          'current' => boolean false\r\n      2 => \r\n        array (size=5)\r\n          'class' => string 'page-number page-numbers' (length=24)\r\n          'link' => string '//localhost:3000/category/noticias/page/3' (length=53)\r\n          'title' => string '3' (length=1)\r\n          'name' => string '3' (length=1)\r\n          'current' => boolean false\r\n  'prev' => \r\n    array (size=2)\r\n      'link' => string '//localhost:3000/category/noticias/page/2' (length=53)\r\n      'class' => string 'page-numbers prev' (length=17)\r\n```\r\n\r\nHowever when I move to the second page, it then retrieves:\r\n\r\n```\r\narray (size=3)\r\n  'pages' => \r\n    array (size=3)\r\n      0 => \r\n        array (size=5)\r\n          'class' => string 'page-number page-numbers current' (length=32)\r\n          'title' => string '1' (length=1)\r\n          'text' => string '1' (length=1)\r\n          'name' => string '1' (length=1)\r\n          'current' => boolean true\r\n      1 => \r\n        array (size=5)\r\n          'class' => string 'page-number page-numbers' (length=24)\r\n          'link' => string '//localhost:3000/category/noticias/page/2' (length=53)\r\n          'title' => string '2' (length=1)\r\n          'name' => string '2' (length=1)\r\n          'current' => boolean false\r\n      2 => \r\n        array (size=5)\r\n          'class' => string 'page-number page-numbers' (length=24)\r\n          'link' => string '//localhost:3000/category/noticias/page/3' (length=53)\r\n          'title' => string '3' (length=1)\r\n          'name' => string '3' (length=1)\r\n          'current' => boolean false\r\n  'next' => \r\n    array (size=2)\r\n      'link' => string '//localhost:3000/category/noticias/page/3' (length=53)\r\n      'class' => string 'page-numbers next' (length=17)\r\n  'prev' => \r\n    array (size=2)\r\n      'link' => string '//localhost:3000/category/noticias' (length=46)\r\n      'class' => string 'page-numbers prev' (length=17)\r\n```\r\n\r\nNotice that both `next` and `prev` are present in the array, and still the `pages` array still points to 1 as the current page.\r\n\r\nAm I missing something here?"}}