Creating A Custom PHP Template
-
I am trying to create a custom PHP template for a single page in WordPress. I duplicated the original “page.php” file and added a custom code. I have renamed the file using the slug to everything from, “page-pagename.php” to “template-pagename.php”. For some reason it is not showing up in the templates dropdown. I also added this and a longer variation of it to the top of the PHP file:
/** * Template Name: name-of-your-template **/
I am not sure if I am doing this correctly or not. I am using the Storefront theme for WooCommerce, and running WordPress 4.9.2.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Creating A Custom PHP Template’ is closed to new replies.