Need a unique gift idea?
A Pastebin account makes a great Christmas gift

WooCommerce - Add category name after result count

lorro Aug 8th, 2015 (edited) 181 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
  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