admin管理员组

文章数量:1418352

This is most likely a duplicate and I'm just struggling for the right way to search it but what file is used to display actual pages of posts, not the post type of page but like /blog/page/2/ for the second page of most recent posts?

Searching reveals only how to make a template that applies to a page, but what if I just want it to apply to pagination?

The function I use to generate a link to this template is previous_posts_link();

This is most likely a duplicate and I'm just struggling for the right way to search it but what file is used to display actual pages of posts, not the post type of page but like /blog/page/2/ for the second page of most recent posts?

Searching reveals only how to make a template that applies to a page, but what if I just want it to apply to pagination?

The function I use to generate a link to this template is previous_posts_link();

Share Improve this question asked Jul 29, 2019 at 4:18 joeybab3joeybab3 1011 bronze badge
Add a comment  | 

1 Answer 1

Reset to default 1

It’s the same template used for displaying the normal page (example, page.php) but you have a conditional tag is_paged https://codex.wordpress/Function_Reference/is_paged which can help you to achieve whatever you want for the other pages /2/, /3/, etc.

本文标签: theme developmentWhat template file is used for homepage pagination