0
votes

I need some help with how the setup for templates work for custom posts.

We have the following setup:

enter image description here

with Posts pointing to single.php which is fine. Then Services points to single-services.php and Stories points to single-stories.php.

I need to set up an Overseas Service custom post type which will have its own php file as the styling needs to be a specific way as it will incorporate a form that is only used here.

I duplicated the single-services.php file, as the base will look very similar to that, and called it single-overseas-service.php

I used the Toolset plugin to set up the new post type and the template is showing single.php and it can't be changed to a different file.

If someone could break down how best to do this, that would be great.

TIA, Andy

1

1 Answers

1
votes

This is caused by the - in your CPT's name. Change it to a _ or remove it altogether and you shouldn't have a problem.

eg, overseas_service and single-overseas_service.php