I want to create a custom template for my job post listing

I have registered a new custom post type, job. Then I have created a template for a single job post, single-job.php, which works fine.

But when I enter URL www.xyz/job all records are displayed using the index.php template which, is the one that my blog uses. How can I create custom template for www.xyz/job records so I can edit it independently without touching blog template, which is index.php?

up vote 2 down vote accepted

A specific post type template could be created with archive-{post_type}.php -> archive-job.php.

Here is a good descriptive image of the template hierarchy in WordPress. enter image description here Read more about the template hierarchy

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.