Website Building » WooCommerce » How Do I Create a Template Page in WooCommerce?

How Do I Create a Template Page in WooCommerce?

Last updated on January 21, 2023 @ 1:03 pm

Creating a template page in WooCommerce is a two-step process. First, you need to create a new page template file and then add it to your WooCommerce pages.

Creating the new page template file is simple. Just create a new file called page-my_template.php and add the following code to it:

Replace “My Template” with the name of your template. This will be the name that appears in the WooCommerce page dropdown when you select your page template.

Now that you have created your new page template file, you need to add it to your WooCommerce pages. To do this, open up the WooCommerce Settings page and go to the Pages tab.
From here, you can select your new page template from the Template dropdown for each WooCommerce page.

Creating a template page in WooCommerce is a two-step process. Creating the new page template file is simple. Just create a new file called page-my_template.php and add the following code to it:

<?php
/*
Template Name: My Template
*/
?>

Replace “My Template” with the name of your template.

This will be the name that appears in the WooCommerce page dropdown when you select your page template. Now that you have created your new page template file, you need to add it to your WooCommerce pages. To do this, open up the WooCommerce Settings page and go to the Pages tab.

From here, you can select your new page template from the Template dropdown for each WooCommerce page.

PRO TIP: If you are not familiar with WooCommerce, we recommend that you seek help from a qualified developer before attempting to create a template page. Doing so could break your site if not done correctly.
Kathy McFarland

Kathy McFarland

Devops woman in trade, tech explorer and problem navigator.