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
80
votes
9 answers

Get custom product attributes in Woocommerce

In Woocommerce, I am trying to get product custom attribute values but I fail miserably and I don't get anything. So I tried: global $woocommerce, $post, $product; $res =…
Nick
  • 2,993
  • 6
  • 21
  • 36
15
votes
3 answers

Have a WordPress page with same title as custom post type “front” slug

I have a custom post type djs and a custom taxonomy city with two terms: boston and nyc. So a DJ can either be tagged as Boston or NYC. DJ profiles (a single djs post) are located at /nyc-wedding-dj/joe-shmoe/, for example, or for a Boston DJ,…
HandiworkNYC.com
  • 10,184
  • 23
  • 85
  • 145
13
votes
1 answer

How To Exclude Results From Custom WordPress MySQL Query By Taxonomy Term

I only want to show posts which do not have the term 'brand-slug' for the taxonomy 'product-brand'. My current query doesn't apply the filter: SELECT DISTINCT * FROM $wpdb->posts AS p LEFT JOIN $wpdb->postmeta AS meta ON p.ID = meta.post_id LEFT…
HWD
  • 1,887
  • 7
  • 30
  • 60
12
votes
4 answers

How to get the taxonomy values of a custom post type

I am creating a new template that will get all the custom post type (Case Studies) content, including the taxonomies values associated with it. So far I got the following:

user2091936
  • 516
  • 1
  • 6
  • 26
8
votes
2 answers

How to add custom taxonomy in custom post type permalink?

I have a custom taxonomy called campaign and a custom post type called asset. For assets, I want to have the following permalink structure: mysite.com//. I have achieved this by the following code, but now if I go to any…
sadmansh
  • 791
  • 1
  • 6
  • 14
8
votes
1 answer

Hook into 'save custom taxonomy' like 'save_post' in WordPress

Is it possible to hook a function when a custom taxonomy term (which is not known beforehand), (preferably custom taxonomy child term) is edited/saved, just like the way we can hook into save_post when a post or page is saved? What I want to do when…
andyderuyter
  • 941
  • 1
  • 7
  • 20
8
votes
2 answers

Create new product attribute programmatically in Woocommerce

How can I create attributes for WooCommerce from a plugin? I find only : wp_set_object_terms( $object_id, $terms, $taxonomy, $append); From this stack-question But this approach required id of some product. I need to generate some attributes not…
WebArtisan
  • 3,248
  • 9
  • 31
  • 54
7
votes
4 answers

Custom Taxonomy not showing in Post Gutenberg editor

I have registered a custom taxonomy in Wordpress, and I can't work out why it is not displaying in standard Wordpress posts, since Gutenberg has been introduced. What I mean by this, is that it does not display in the document sidebar when adding or…
dungey_140
  • 1,918
  • 5
  • 21
  • 51
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 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
  • 722
  • 2
  • 14
  • 34
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
  • 1,888
  • 5
  • 33
  • 67
7
votes
1 answer

Wordpress get_terms returns empty array for custom taxonomy

i have a bit problem with Wordpress Taxonomies... Below you can see initialization of my custom taxonomy named job_keywords. function register_job_keywords() { $labels = array( [... lables here ...] ); $args = array( …
Griva
  • 1,263
  • 16
  • 33
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:…
7
votes
2 answers

Display current post custom taxonomy in WordPress

I've created custom taxonomies on WordPress and I want to display the current post taxonomies on the post in a list. I'm using the following code to display a custom taxonomy named "Job Discipline":
Bhanu Chawla
  • 1,058
  • 2
  • 13
  • 24
6
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,231
  • 1
  • 17
  • 29
1
2 3
71 72