Matoeil
Matoeil

Reputation: 7289

wordpress single-{posttype}.php

I have copied and modified the single.php file as decribed below:

 http://codex.wordpress.org/Post_Types

in order to add a custom html file to it.

is it possible to create a post with the normal procedure on the dashboard but that would call that new single-{posttype}.php instead of the single.php ? meaning being able to choose with template to use from each time .

Upvotes: 1

Views: 93

Answers (1)

brasofilo
brasofilo

Reputation: 26055

Well, there is a plugin for that:

Custom Post Template

Provides a drop-down to select different templates for posts from the post edit screen. The templates replace single.php for the specified post.

Otherwise, you may want to check the filter hook template_include.

Upvotes: 1

Related Questions