My code below basically gets a bunch of films from the db and sets the year as the array key then echoes out each film per year. Thats all cool although my results are getting to long and need paginating. I cant find any examples that help my situation as most pagination in php is for while loops – appreciate any help or feedback.
fisrt image of code

second image of code

Read more here: how to add pagination on foreach in wordpress


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Wordpress related questions and answers: