So away from my normal post of the media I’ve been creating and to a little something that I couldn’t find and took way too long to do something very simple. I’ve been working on a site that was almost done and they wished to have a Sale page so when anything goes on sale it automatically gets put onto the page, I’m only slightly editing a woo theme so used woo commerce which to be fair I’m not too familiar with but this is something I’ve seen on many site so didn’t hesitate at the request. I could be wrong in the best way to do this but the way I have found it possible and easy to do was
- head to my themes folder and find the page.php file
- copy this and rename page-sale.php
- add the custom-page template code to the top of the page
-
<?php
/*
Template Name: sale
*/
?> - get to the site’s dashboard and create a new page
- title it sale and in the text editor side of the content type
[sale_products]
- change the template to sale
- publish and done in a minute flat