daily pastebin goal
59%
SHARE
TWEET

WooCommerce - Insert after archive category items

lorro May 21st, 2015 (edited) 218 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.   // code goes in functions.php for your child theme
  3.   // insert content after category items on the archive page
  4.   // not after product items on the archive page
  5.   add_action( 'woocommerce_after_subcategory', 'after_category_item' );
  6.   function after_category_item($category) {
  7.     $category_id = $category->cat_ID;
  8.     if ($category_id == "16") {
  9.       echo '<a href="http://www.mydomain.com/page" class="my_cat_link">More info</a>';
  10.     }
  11.   }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top