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.

1187 questions
8
votes
2 answers

link to custom taxonomy by id

Through a series of specific requirements, I find myself needing to link to a custom taxonomy category using its term id... I've got this - which displays a link to all taxonomies - I wish to change it so it only displays a link to the taxonomy with…
JorgeLuisBorges
  • 528
  • 3
  • 8
  • 21
7
votes
2 answers

Query posts by custom taxonomy ID

I have a custom post type called portfolio and a custom taxonomy called build-type (acting as categories) I am trying to query portfolio posts by build-type ID e.g. all Portfolio posts in "Hotels" (id=4 for that taxonomy) // gets the ID from a…
mattberridge
  • 361
  • 1
  • 2
  • 8
7
votes
1 answer

Add a new term to a product attribute and set it in the product in Woocommerce

My custom taxonomy (WooCommerce attribute) already exists and I am using the following to add a new term to the taxonomy and associate it with my WooCommerce product: wp_set_object_terms($product_id, array($omega_jahr),…
Richard Tinkler
  • 1,635
  • 3
  • 21
  • 41
7
votes
1 answer

Get products which are visible in catalog in a WP_query on Woocommerce

I'm currently trying to get all products in a category page which are visible in catalog. I've tried this here but I'm getting no products with this query: $args = array( 'post_type' => 'product', 'product_cat' =>…
Mr. Jo
  • 4,946
  • 6
  • 41
  • 100
7
votes
1 answer

Get the product attribute label name in Woocommerce 3

I am using a lot of product attributes on my products in Woocommerce and I am looping through all variations in a table that can be displayed with a shortcode on a product page. For this table I need all the product attributes in the table head…
Renato
  • 73
  • 1
  • 1
  • 5
7
votes
1 answer

Custom Post Type Slug clash

I have multiple custom post types with custom taxonomies. I'm having a slug clash despite of having different parents. Here is my URL structure: /work/%client_name%/%project_name% I have a client (client1) and project (some-cool-project-name) that…
ialphan
  • 1,241
  • 1
  • 17
  • 30
7
votes
1 answer

Custom Post type and Taxonomy using same slug with rewrite

This is my first attempt at working with WordPress rewrite rules so please bear with me. The issue is that all the items I add to my portfolio have multiple categories. I would like to remove the category from the url when displaying the portfolio…
James
  • 702
  • 2
  • 15
  • 39
7
votes
2 answers

Get the Product tags for the current product only in WooCommerce

How can I display only the product tags for the current single product page and not all the products tags? I've found questions about most popular tags but not for that.
DigitalSM
  • 113
  • 1
  • 2
  • 10
7
votes
2 answers

Auto add all product attributes when adding a new product in Woocommerce

A client of mine requested this weird change based on Wordpress' plugin Woocommerce in order to make things "easier".. Is it somehow possible to have all product attributes automatically added when a product is created? Also is it possible to…
7
votes
3 answers

Combine multiple custom user taxonomy in single url

I have created custom user taxonomy for user and its working good for single taxonomy. From Bellow reference guide i have created custom user taxonomy. Reference guide:-…
Sanjay Nakate
  • 2,020
  • 6
  • 39
  • 74
7
votes
2 answers

Using Custom Taxonomy Term ID for Custom Field

I have created a custom single-sermons.php template file for my sermons custom post type and want to include the sermon speaker image custom field of the sermon speaker for this post. Custom Taxonomy ID: sermon_speaker Custom Field ID:…
6
votes
1 answer

Different recipients based on product category in WooCommerce email notification

I am setting up a site for a school that sells both virtual products (fees and excursion payments) and Physical (uniforms) however they would like to have order notifications for each category to be sent to separate recipients as they are dealt with…
6
votes
3 answers

Woocommerce get product attribute ID using name

I want to get the ID of a Woocommerce product attribute using the attribute name. e.g. pa_foobar I know that product attributes are taxonomies, but get_taxonomy() doesn't return the taxonomy ID. I can't find a Woocommerce function that does this.
Robbie Lewis
  • 2,844
  • 3
  • 18
  • 29
6
votes
3 answers

Get All Shipping Classes in Woocommerce 3

I've been unable to crack this nut, but can't help feel that I'm missing something simple. I'm developing a WooCommerce plugin that should provide a list of shipping classes on its admin settings page. The following code as suggested in another…
mike.bronner
  • 1,203
  • 1
  • 20
  • 39
6
votes
1 answer

How to check if product has a specific product attribute in Woocommerce

I would like to identify if a product has an attribute or not. For example: if (product has attribute 'pa_color') { //do something } How can I accomplish this?
Vpant
  • 321
  • 1
  • 5
  • 15
1
2
3
79 80