daily pastebin goal
70%
SHARE
TWEET

WooCommerce - Add category name after result count

lorro Aug 8th, 2015 (edited) 180 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.   // Add category name after result count
  3.   // add this in result-count.php before the last line:
  4.   // the edited file goes at:
  5.   // wp-content/themes/my-theme-name/woocommerce/loop/result-count.php
  6.   if (is_product_category()) {
  7.     global $wp_query;
  8.     $cat = $wp_query->get_queried_object();
  9.     echo ' for '.print_r($cat->name, true);
  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