WordPress.org

Ready to get started?Download WordPress

Forums

Custom Templates with custom post type (3 posts)

  1. neonWired
    Member
    Posted 2 years ago #

    Is there a way to use custom templates with custom post type, currently they only show on pages?

  2. James Duffell
    Member
    Posted 2 years ago #

    @neonWired

    As custom post types are essentially themes they use a variation of the single.php template, if you have a post type called test, the template for a custom post type page would look for the file single-test.php and the index pages / archive for the custom post type would be archive-test.php.

    Hope this helps.

    ^JD

  3. sdaponte
    Member
    Posted 2 years ago #

    Thank you @JamesDuffell! Much appreciated

Topic Closed

This topic has been closed to new replies.

About this Topic