• When creating standard pages we can use single or archive page templates or simply create our own page template creating a new page with the slug for example: photography and actual page: page-photography.php so we can write unique content to each page if we need to.

    How can we do the same with custom post types? So, I have a custom post type called services how can I create custom unique pages for each of my services?

    I know I can write the content directly to each service page and pull it from there but this is not what I want. I would like to have full control over each service page.

    Hope this can be done in a simple way.Many thanks!

    • This topic was modified 2 years, 3 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Developing with WordPress topic
Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi,

    You can create a single page template of custom post type like this (Duplicate the single.php file and rename it like single-{post_type}.php)
    so you can create like this (single-services.php) and then flush the permalinks
    in admin side.

    Thread Starter maryando

    (@maryando)

    Hello Amit, and thank you for your reply, but I don’t want to use single or archive post type having one template for all services. I need to have unique separate templates for each service. Same as with the pages is this duable?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to assign Page Templates to the Custom Post Type’ is closed to new replies.