Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Design

Brendin Schlitzer
Brendin Schlitzer
5,703 Points

Pagination

Hi

I am relatively new to web design and development and I am busy with a personal project but I am having issues with pagination. My problem is I don't specifically understand how it works.

Does anyone know of or can direct me to a resource that will help me?

Thanks in advance

1 Answer

Ryan Field
PLUS
Ryan Field
Courses Plus Student 21,242 Points

Hi, Brendin. It really depends on how you want to do pagination. Are you using PHP? Wordpress? Another CMS? The method you use will vary depending on what you're using to do it, but basically, you are looking into a database and seeing the total number of rows and then dividing that by how many items you wish to show per page to get the total number of pages. There's a tutorial here for PHP that gives a good run-down of how it works. It's from 2009, so it's a bit old, but the concept is still the same.

Brendin Schlitzer
Brendin Schlitzer
5,703 Points

Thanks Ryan that helps a lot. I am using PHP to query the database.