Skip to content

Instantly share code, notes, and snippets.

@Hendrikv1990
Created November 23, 2015 10:10
Show Gist options
  • Save Hendrikv1990/ea0c8265856d705f8473 to your computer and use it in GitHub Desktop.
Save Hendrikv1990/ea0c8265856d705f8473 to your computer and use it in GitHub Desktop.
Woocommerce Templates
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