daily pastebin goal
48%
SHARE
TWEET

Category Children Write Filter

sparkweb Apr 6th, 2012 116 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. add_filter('foxyshop_category_children_write', 'my_foxyshop_category_children_write', 10, 2);
  2. function my_foxyshop_category_children_write($liwrite, $term) {
  3.         global $taxonomy_images_plugin, $post;
  4.        
  5.         if (substr($term->name,0,1) == "_") continue;
  6.  
  7.         $url = get_term_link($term, "foxyshop_categories");
  8.         $liwrite = "";
  9.         $liwrite .= '<li id="foxyshop_category_' . $term->term_id . '">';
  10.         $liwrite .= '<h2><a href="' . $url . '">' . $term->name . '</a></h2>';
  11.         if ($term->description) $liwrite .= apply_filters('the_content', $term->description);
  12.         if (isset($taxonomy_images_plugin)) {
  13.                 $img = $taxonomy_images_plugin->get_image_html("thumbnail", $term->term_taxonomy_id);
  14.                 if(!empty($img)) $liwrite .= '<a href="' . $url . '" class="foxyshop_category_image">' . $img . '</a>';
  15.         }
  16.         $liwrite .= '</li>'."\n";
  17.        
  18.         return $liwrite;
  19. }
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