Questions tagged [custom-taxonomy]

Custom criteria that allow categorization, identification, nomenclature, and classification of various entities in software.

Custom defined criteria that allow categorization, identification, nomenclature, and classification of various entities in software and programming.

Custom taxonomies are commonly used in WordPress and Drupal as a methodology to group and organize content entries.

1078 questions
3
votes
2 answers

Add a filter dropdown for product tags in woocommerce admin product list

I want to also add a filter tag next to the filter by category in the woocommerce products page. Below image is in ducth but I want to add another dropdown menu if possible.
Raymond the Developer
  • 1,324
  • 2
  • 18
  • 50
3
votes
2 answers

Redirect when buying products from a certain product category in Woocommerce

I have this code: add_action('template_redirect', 'woo_custom_redirect'); function woo_custom_redirect( $redirect ) { if ( ! is_user_logged_in() && (is_checkout()) ) { wp_redirect( home_url( '/my-account/edit-account/' ) ); …
Dmitry
  • 139
  • 1
  • 4
  • 23
3
votes
2 answers

Get attribute slug value by variation ID in Woocommerce

I'm building a custom product page but I have problems with variations This is my code: global $product; $variations = $product->get_available_variations(); foreach($variations as $variation) { $variation_id = $variation['variation_id']; …
Alberto
  • 192
  • 2
  • 11
3
votes
1 answer

Custom product price suffix for selected product categories in WooCommerce

I would like to display a piece of text after the price tag in WooCommerce. I have a code that is working for my functions.php, but it shows on all product categories. I was wondering if someone knows how to make this custom text to show for only…
3
votes
1 answer

Get list of slugs for a specific product attribute on archive pages in Woocommerce

I need to display some custom icons on the product overview (category, archive) page based on a set of ingredients (which is a Woo product attribute). I am hooking in at woocommerce_after_shop_loop_item_title and that is the right place to display…
Eric
  • 4,894
  • 8
  • 33
  • 65
3
votes
1 answer

Filter product category archive pages in WooCommerce

I'm currently working on a WordPress/WooCommerce bookstore site, that uses a custom taxonomy.php WooCommerce template to display sets of products by one product category called "Highlights". So, for example,…
nickpish
  • 777
  • 3
  • 19
  • 40
3
votes
1 answer

Using a custom taxonomy for products shortcode in Woocommerce 3.3

I'm currently developing the homepage for a Woocommerce website and on this page the goal is to have 3 rows displaying products from different brands. Example; Row 1 will display Apple Products, Row 2 will display Samsung Products and Row three will…
3
votes
2 answers

Display a custom message When 2 specific product category are in cart

In Woocommerce, I'm trying to make a function that displays a message above the cart page when products with both categories are in the cart. I'm trying to modify code that I found here but now it already shows the message when one of the categories…
Cel
  • 33
  • 7
3
votes
1 answer

Hide shipping methods based on products categories in Woocommerce

With Woocommerce, I would like to hide all shipping methods except "Local pickup" when a defined products category is in cart… The code below does that for other product types, except variable products: add_filter( 'woocommerce_package_rates',…
Pityer
  • 131
  • 1
  • 11
3
votes
1 answer

Show h2 tag ONLY if there is a description in product category in Woocommerce

Our Woocommerce product category archive pages have an

tag at the top followed by the grid of products as by default. Now we have added an

tag with the category name again at the bottom and under the

tag is the description for that…

Patrick
  • 758
  • 8
  • 28
3
votes
1 answer

Wordpress add custom taxonomy to custom menu

I have searched and searched and can't find another way other than what I will refer to as the 'hack method' to add a custom taxonomy to a custom admin menu. add_menu_page( 'Practice Directory', 'Practice Directory', 'read', …
Orlando P.
  • 540
  • 2
  • 17
3
votes
2 answers

Change the add to cart text for a specific product category in Woocommerce 3

I want to change the add to cart text on product archives on specific categories only. For example, on preorder category i want instead of add to cart text, to be Preorder. I don't know how to identify Preorder category in the below…
csandreas1
  • 1,870
  • 19
  • 36
3
votes
1 answer

WordPress: How do I add more than one taxonomies in a custom post post type

I have created a Custom Post Type called user-story. The $args looks like this: $args = array( 'labels' => $labels, 'hierarchical' => true, 'description' => 'description', 'taxonomies' => array('category', 'story-type', 'genre'), …
Subrata Sarkar
  • 2,712
  • 4
  • 32
  • 67
3
votes
3 answers

Counting cart-items of specific product category

I am trying to get the number of items in the cart just from a specific product category in WooCommerce. I am doing a site for a winery. It has alcoholic and non-alcoholic products. All the wine falls under the main category of 'wine' or category id…
3
votes
3 answers

Limit the number of taxonomy terms diplayed

I have 2 taxonomy sets product_cat and tvshows_cat. There are 12 terms for each set. A product can have, up to 12 terms (but never from the 2 sets at the same time). I use this code to show the term list in the product page: $cats =…