• Resolved rookdesigns

    (@rookdesigns)


    Hey there, how’s it going. Just using your theme with custom post types and I’m having trouble overriding single page templates, which template should I use and how should I use it?

    Like i have a custom type called portfolio, so should I take single.php copy it and make single-portfolio.php and make my edits there?

    Cheers

    Harry

Viewing 2 replies - 1 through 2 (of 2 total)
  • Theme Author Christine Rondeau

    (@crondeau)

    Hi harry, yes that would be the way to do it.
    In fact, if you’ve set up your custom post type and added a post.
    If you view that post and look at the html source code, in the body tag, you will see something like:

    <body class=”single single-portfolio post post…. etc…

    I look at the source code all the time to see what the template should be called for. I’ve made typos in the past and it’s by looking at the classes in the body tag that I’ve discovered my mistake.

    Thread Starter rookdesigns

    (@rookdesigns)

    Oh right, excellent I never knew about that. Thanks a bomb christine.

    All the best

    Harry

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘overriding templates with custom post types’ is closed to new replies.