| Custom Post Template plugin.
Step: 1, install the custom post template plugin. WP download: dot me
2. Copy the single.php and rename it, for example single-new.php
3. Open the renamed file and add the code at the top
<?php/*template Name posts:new*/?>
| function specifies the category template
another is to use the function to specify the classification article template: Point Me
Add_action (' template_include ', ' load_single_template '); function Load_single_template ($template) {$new _template = '; Single post template if (Is_single ()) {Global $post; ' WordPress ' is category slugs if (has_term (' WordPress ', ' Category ', $post)} {//Use template file single- wordpress.php $new _template = locate_template (Array (' single-wordpress.php ')); }} return ('! = $new _template)? $new _template: $template; }
WordPress lets articles use different templates