This code loads the template file named featured.php from the child themes root directory.
You can use the code in your child themes functions.php file to load any type of template file conditionally.
In this case it uses the is_singular('page')
conditional tag to load the template file named featured.php on all single pages.
Load Single Post Template On Single Pages
If you want to use a single.php post template on single pages you can add a template header to the file like this :
/**
* Template Name: Single Page Template
*/
This enables you to choose the Single Page Template from the Templates drop down menu in the Page Attributes box on any single page.
Was This Tutorial Helpful?