Created
November 23, 2015 10:10
-
-
Save Hendrikv1990/ea0c8265856d705f8473 to your computer and use it in GitHub Desktop.
Woocommerce Templates
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Templates work as follows in Woocommerce | |
> Create a php file name it template-calculator | |
Add the following PHP code, and go to pages, create page, name it calculator. Choose on the right the template (calculator). | |
All the code written in the template can be used. | |
<?php | |
/** | |
* The template for displaying full width pages. | |
* | |
* Template Name: Calculator | |
* | |
* @package storefront | |
*/ | |
get_header(); ?> | |
<div id="primary" class="content-area"> | |
<main id="main" class="site-main" role="main"> | |
<h3>Calculation Time</h3> | |
<?php woocommerce_cart_totals(); ?> | |
</main><!-- #main --> | |
</div><!-- #primary --> | |
<?php get_footer(); ?> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment