How to add a “Free Entry Route” button to each competition

 

To achieve this follow the steps below:

  1. Create Backup of your website if you are unsure what you are doing – follow very closely as editing the functions.php wrongly can cause errors.
  2. Open up the admin dashboard
  3. Navigate to Appearance > Theme Editor
  4. Click on Functions.php

Next Copy this piece of code into the top of the File just BELOW <?php (See Screenshots). Failure to do this can break the website.

add_action( 'woocommerce_after_add_to_cart_button', 'after_add_to_cart_btn' );
function after_add_to_cart_btn(){
echo "<p style='padding-top:15px;'>For free entry route see <a href='/terms-conditions/#postal'>T&C's</a></p>";
}


All the best

Ryan

Previous Post
How to control the order of competitions on the homepage