Hey magicians!
Its time for me to get back on working on my Astro site. Last time I build a new site connected to WP to fetch my posts. I followed @gloomy smelt 's article and guidance. https://wpengine.com/builders/building-headless-wordpress-site-astro/
At that time, I totally forgot to check on setting up pagination for fetched posts. Since I'm not the hottest dev in the classroom, I struggle with figuring out how to set up pagination for this. Search, or some sort of live-search would also be necessary.
Here's the JS fetching the WP posts from my previous Wordpress site.
https://github.com/mrjohnmac/JohnMacReload/blob/Main/src/lib/api.js
Here's the main layout mapping the posts.
https://github.com/mrjohnmac/JohnMacReload/blob/Main/src/layouts/ArchiveLayout.astro
Any suggestions or pointers on how I should start looking into this?
With love from Thailand,