Questions tagged [taxonomy-terms]

Terms are usually associated to custom taxonomies in Wordpress

Use this tag if you mean terms used for custom taxonomies in Wordpress

486 questions
2
votes
1 answer

Hide from all site and single page product of a whole specific category in WooCommerce

I have been trying to hide all products from a specific category (from shop page and single page) using this StackOverFlow answer code and following instructions on this other forum thread On "Exclude specific product categories on Woocommerce…
2
votes
1 answer

Display custom taxonomy terms on WooCommerce product archive pages

I've create a taxonomy called "couchages" for product with value : 1 couchage, 2 couchages, 3 couchages,… I would like to print the value of this taxonomy, for each product on the archive page, like this: Image1,product1, price1, taxonomy value of…
2
votes
1 answer

Get top level parent product category as body class in WooCommerce

I need to get the TOP level category (not just the parent category) of a subcategory of products in Woocommerce. I have this code to get the parent category id: if (is_subcategory()) { $term = get_queried_object(); $parent_id =…
2
votes
1 answer

Checking that an order has a product with a specific attribute value Woocommerce

I'm to go check if a product added to cart and purchased is in an order. I.e when a user purchase a variable product along with other variable products, i want to check if a specific variable product is added and purchased. So that i can dynamically…
2
votes
1 answer

Order wordpress taxonomy parent terms by their children count

I need to order parent terms by their children count: function sort_terms_by_children_count ( $terms ) { $sort_terms_by_children_count = array(); foreach($terms as $term) { $count = count (get_terms( $terms, array( 'child_of' =>…
antonimac
  • 35
  • 3
2
votes
1 answer

Get the subcategories of the current product category in Woocommerce archives

I'm trying to Show subcategories (not subsubcategories,etc) under current category in Woocommerce like this Web: http://www.qs-adhesivos.es/app/productos/productos.asp?idioma=en For Example, Construction is the category, and Sealants & adhesives,…
Alvaro
  • 35
  • 1
  • 1
  • 6
2
votes
1 answer

WooCommerce product: display product category term names without links

I want to call product category name when i tried this code $product->get_categories(), it is calling categry name + link, can anyone help me to call only category name
CJ Junior
  • 31
  • 3
2
votes
1 answer

Display Variable Product Attributes and Terms on Woocommerce Archives

I am trying to accomplish a attribute and term list on the shop page using the hook woocommerce_shop_loop_item_title. The goal is to get the attribute(s) and term(s) for the product and then to display it like this example: Color: Red, Blue,…
user11391182
2
votes
2 answers

Remove

tags from product attributes in WooCommerce

WooCommerce automatically adds a

tag to all product attributes after the weight and dimensions. This means that the formating of the product attributes changes after the first 2 lines. I believe the code below (pulled from…

Jamesy
  • 23
  • 3
2
votes
2 answers

WooCommerce: Get purchased items for a product category using a SQL query

I am trying to list all of the products bought that belong to a certain product category, for instance all T-shirt orders under the "clothes" product category. I find the Woocommerce database structure quite confusing and you have to write long…
John Smith
  • 465
  • 1
  • 4
  • 18
2
votes
2 answers

Add text before product price for specific category in Woocommerce

In woocommerce I am using "Add text before product price if it's higher than a specific amount in Woocommerce" answer code that adds text before all prices. How can I make this code work only for a specific product category? Any help is appreciated.
Mehdi
  • 29
  • 4
2
votes
1 answer

Show subcategories of a main category in "Shop By Category" section in Woocommerce Storefront

I'm setting up a Woocommerce shop using Storefront Theme and I would like know how can I show subcategories instead of categories in the "Shop by Category" homepage section? I need to show product subcategories instead because my root product…
2
votes
1 answer

How to get the variation shipping class in Woocommerce

I would like to display variable products shipping class set for each variant. I realize that I may need to have a mix of php and Javascript but I would like to get the PHP side right first. I am guessing the best way to start is to use: if(…
2
votes
1 answer

Woocommerce recent products gets items of every parent category

As many other users, i'm using also related products for my shop. I tried to modify it so that it's replacing the last word with the active category name. So when the product is in the category Bed, the related product text is These are our…
p_e_88
  • 1,029
  • 11
  • 24
2
votes
1 answer

Display category name next to product name on single product page

I'm trying to add the category name next to the product name on my woocommerce page. I would like to displays it because of SEO reasons, so that Google knows that this product belongs to this category. My code looks like this at the moment …
p_e_88
  • 1,029
  • 11
  • 24