Wordpress Pagination

I have a wordpress page that I want to Paginate posts on but I only want to show 18 posts at a time and then on scroll down, load the next 18. so if you have a total of 20 items at first it should show 18. When you scroll down, it kicks in and shows the last 2
that's all there is to it
now if you have 60 items, then it will kick in after the 18th..... it will load another 18
once your reached the bottom it will reach the other 18 and so on.  Can anyone point my in the correct direction?
LVL 8
rgranlundAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Peter HartCommented:
what you are describing sounds like the "infinite scroll" or "load new posts in scroll" function.
I don't think you can state a number like 18, but it just loads the next posts that fit in the bit you have scrolled.
there is a way with JetPack  discussed here:
https://jetpack.com/support/infinite-scroll/
but states it only works on infinite scroll compatible themes.
there is also this plugin
https://en-gb.wordpress.org/plugins/wp-infinite-scroll-posts/
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
WordPress

From novice to tech pro — start learning today.