Support » Themes and Templates » custom post types – custom template page

  • How do we assign a custom template to a custom post type?

    For example I have a custom post type “Portfolio”. Currently it is using the single.php template but I would like it to use a custom version of the single.php template file.

    I’ve tried naming the template file single-portfolio.php and portfolio-single.php without success.

    Thanks for your help.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Figured it out… The modification to the file name needed to match exactly the value used in register_post_type('Portfolio',... so it would be “single-Portfolio.php”

    Simon Wheatley


    Code for the People

    That’s core functionality… you don’t need my plugin for that. 😉

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘custom post types – custom template page’ is closed to new replies.