I don't understand why this would fix the issue and why the first line is not correct. Why would you want to create the pagination on all posts and not only the published one? Maybe the code in the page method from Post is not doing implemented correctly? Would love to understand the bug before accepting this code change. Thanks for your feedback