I Cannot Create New Category

Tom’s answer looks really useful to me. I’d also suggest the standard WP troubleshooting tip of turning off plugins and seeing if you are able to add categories when your plugins are off. If so, turn plugins back on one by one and see if you can figure out which plugin is the “culprit”. Sometimes … Read more

Giving wp_list_categories the class of the category

I would use get_categories() instead, so that you can have better control over the output of your list. And if I recall correctly, wp_list_categories calls get_categories anyway. You can use the same $args array in either function, and you should get the same categories as a result. Then you can simply build your own unordered … Read more

Get Tags specific to Category using WooCommerce plugin

Finally solve the problem: t1.taxonomy = ‘product_cat’ AND p1.post_status=”publish” AND terms1.term_id IN (“.$args[‘categories’].”) AND t2.taxonomy = ‘product_tag’ AND p2.post_status=”publish” In the functions.php t1.taxonomy = ‘category’ AND p1.post_status=”publish” AND terms1.term_id IN (“.$args[‘categories’].”) AND t2.taxonomy = ‘post_tag’ AND p2.post_status=”publish” rename category to product_cat, and post_tag with product_tag.

How to get grandparent of a given category

You could write a simple function to do this each time you need to. Here’s an example I found on this website. function pa_category_top_parent_id( $catid ) { while( $catid ) { $cat = get_category( $catid ); // get the object for the catid $catid = $cat->category_parent; // assign parent ID (if exists) to $catid // … Read more

Category index featured image

What I did was; using the Taxonomy Images plugin to associate an image with each category, then to my theme’s header.php, below the <a> line in the above code; <?php $image_id = apply_filters( ‘taxonomy-images-queried-term-image-id’, 0 ); if ( is_category() && ! empty( $image_id )): print apply_filters( ‘taxonomy-images-queried-term-image’, ”, array( ‘image_size’ => ‘header’ ) ); else … Read more