Advertisement
lorro

WooCommerce - Insert after archive category items

May 21st, 2015
321
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.45 KB | None | 0 0
  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.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement