Limit Timber pagination number items


Transparency: WordPress newbie here. 👋🏻

I am working on a WordPress Timber/Twig project and I’ve added some pagination based on the documentation here:

However, my pagination is showing 1 through 9, then the ellipsis, then the last page. Ideally we’ll only be showing the three nearest pages on either side making out total of pages being shown 7 at it’s most.

At the moment the design is rendering as follows:
enter image description here

As you can see, this is a bit much, especially for smaller devices.

Jay 3 months 0 Answers 45 views 0

Leave an answer