Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Category Archives page only show 10 posts and no Pagination #370

Open
huynhtan1808 opened this issue May 27, 2022 · 4 comments
Open

Category Archives page only show 10 posts and no Pagination #370

huynhtan1808 opened this issue May 27, 2022 · 4 comments

Comments

@huynhtan1808
Copy link

Hi, I recently found out that the Categories Archives page only shows 10 posts and does not have pagination. Can you check it?

Bonus: How Can I make Featured images show in Related Posts?

@colbyfayock
Copy link
Owner

hey will look into the 10 posts issue, thanks. for the UI check out my comment here:

#358

@huynhtan1808
Copy link
Author

@colbyfayock Hello, Can you please check the 10 posts in the Category page?

@handipriyono
Copy link

handipriyono commented Jul 9, 2023

Hi, @colbyfayock , any update on this? just show 10 post only on category page? and no pagination

@colbyfayock
Copy link
Owner

pagination as you've noticed isnt implemented on categories or i dont think any archive-like page

i likely won't be doing major work on the starter "as is" as i've started slowly working on migrating it over to the App Router

#477

if you want to see how it's being done in the current project for the homepage, you can check out this function for getting paginated posts:

https://github.com/colbyfayock/next-wordpress-starter/blob/main/src/lib/posts.js#L388

which if repurposed for categories or anything else, you should be able to plug in the result into the pagination prop of the archive template:

https://github.com/colbyfayock/next-wordpress-starter/blob/main/src/templates/archive.js#L26
https://github.com/colbyfayock/next-wordpress-starter/blob/main/src/pages/categories/%5Bslug%5D.js#L18

would be happy to take a PR for this, as likely the functionality would be needed for the migrated version whenever i get to that part of it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants