As-written (and as it remains currently), the question was marked as a duplicate of this question: How to fix pagination for custom loops?
The OP edited the question further to dispute the question being marked as duplicate, and to explain that he had attempted a different solution, which led to a different problem.
Apparently (because there is no indication how, when, or why), the question was re-opened, and an answer accepted.
My issues here are two-fold:
- There is no audit trail or other visible indication that the question was closed and then re-opened. In fact, the auto-generated "possible duplicate of..." comment was deleted. So anyone reading the question after-the-fact would have no clue what is being discussed about the question being a duplicate, or why it is relevant.
- The question was re-opened while still a duplicate of the indicated question .Instead of merely reopening the question, the OP should have been asked to edit/rewrite the question, indicating the new approach taken, and the hew issue that resulted.
As it is, that question is currently a mess. The title doesn't match the current issue, and the current issue is buried under two page-lengths of code and commentary. The solution was added to the question, instead of left within the accepted answer. And the ultimate solution is actually buried in the comments of the accepted answer, and not elaborated in the answer itself.
The valid and useful question, and its solution, are lost in the wall of now-irrelevant code and commentary. So, I'm not complaining that moderator action was taken to reopen the question; rather, I'm suggesting that such moderator action should be used to improve the question, so that a duplicate question can be properly rewritten into a new and useful question before being reopened.