I have the following post types:

Post - wordpress built in
Documents - custom post type
Videos - custom post type

I am very new to wordpress and I do not understand the template structure. I am creating template from scratch.
I have created static front-page that lists recent “posts”, recent “documents” and recent “videos”. I have created it using dummy page “Home” with template front-page.
I am using %postype% permalink structure and I am also able to display single item from each custom post type.

What I cannot do is:

  1. I need to have link like mypage.com/posts (or very similar) to display a list of posts with paging (10 posts per page)
  2. I need to have link like mypage.com/videos (or very similar) to display a list of videos with paging (10 posts per page)
  3. I need to have link like mypage.com/documents (or very similar) to display a list of documents with paging (10 posts per page)

I understand how to retrieve 10 posts and I will probably be able to create paging, but I do not understand template structure and heararchy and routing.

Questions
How to name the file(s) where I should add my php code (based on wordpress traditional naming)?

Should I create some dummy pages?

How to make routing work and take code from my newly created php file(s)?


Also I am not sure if this would be correct to call this archive or not taking into account that later I need to filter also posts by date combining all post types in the list.

Read more here: creating files for displaying different custom post type posts with paging


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Related Wordpress search:

, , , , , , ,

Wordpress related questions and answers: