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
4
votes
1 answer

Display linked product attribute term names in Woocommerce

This is my code for display an atributte below a product title. How can I display it like a link to archive page of this attributte? add_action( 'woocommerce_single_product_summary', 'custom_template_single_title', 5 ); function…
4
votes
1 answer

Exclude 'hidden' queried products from carousel in WooCommerce 3+

I have a carousel plugin which does various things and it only shows published products: $common_args = array( 'post_type' => 'product', 'posts_per_page' => !empty($posts_per_page) ? intval($posts_per_page) : 4, …
Lyall
  • 1,158
  • 3
  • 13
  • 34
4
votes
1 answer

Get all product categories in WooCommerce

I am trying to get product categories in WooCommerce, but get_terms() function doesn't work for me. I am getting an empty array. What I am doing wrong? How to get all Woocommerce product category terms?
4
votes
2 answers

Adding postfix to WooCommerce product variation gets overwritten

Im beginning to expect that there is some "update function" built into WooCommerce that only lets me rename variations post_title for a little while. And then it gets set back to what the hooks / WooCommerce has decided? I want to add postfixes…
4
votes
2 answers

Load specific element on Woocommerce product category archives

is their a way via the functions.php or an other php method to don't load a specific div element on the shop / main page in woocommerce?
p_e_88
  • 908
  • 6
  • 17
4
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,535
  • 2
  • 18
  • 36
4
votes
1 answer

Set a product category term in a product on Woocommerce

In Woocommerce I have a Product Attribute called "Platform" the Value of the Attribute is "Steam": So I am bulk importing the products and the Attributes are already there. But now I have to set for every product manually the category. Is it…
M6Gpower
  • 127
  • 8
4
votes
1 answer

WP Custom Post Type Taxonomy Error from Page 2 on

I have the following setup: A custom post-type “intern_post” with slug => 'intern/post' A custom taxonomy “intern_category” with slug => 'intern/category' which is linked to the CPT The taxonomy registration runs before the custom post type…
4
votes
1 answer

Change cart item prices based on specific product attribute value in Woocommerce

I am trying to change product price in cart using the following function: add_action( 'woocommerce_before_calculate_totals', 'add_custom_price', 10); function add_custom_price( $cart_obj ) { foreach ( $cart_obj->get_cart() as $key => $value ) { …
ehsan
  • 43
  • 2
4
votes
1 answer

Display specific product attributes on Woocommerce archives pages

I want to display some specific product attributes of my choice on the store shop page for each product. It is necessary to display the name of the attribute and opposite its value. I started writing code, I wanted to print at least names, but I…
Aleks Pvn
  • 131
  • 1
  • 2
  • 10
4
votes
2 answers

Show count of Custom Taxonomy only for a specific Custom Post Type

I want to display the count of a Custom Taxonomy based on a specific Custom Post Type. At the moment, I'm using get_terms to list all terms of the Taxonomy. The Taxonomy is used by more than one Post Type. So the counter shows all the usage of the…
Cray
  • 3,872
  • 7
  • 36
  • 96
4
votes
3 answers

wordpress get taxonomy list of custom post type

I am using "Video" theme for my wordpress website. In this theme, videos post type and "videoscategory" taxonomy are defined. Here is the register code for taxonomy: add_action("init", "custom_posttype_menu_wp_admin1"); function…
user3752276
  • 201
  • 1
  • 5
  • 12
4
votes
2 answers

Wordpress, get current level of taxonomy in an archive page

I'm creating a WordPress site to display a catalogue of items using a custom post type and a custom hierarchical taxonomy. I'd like to keep it simple and deal with the items in a single archive page, but I need help how to determine the level of…
kamontander
  • 47
  • 1
  • 6
4
votes
2 answers

Wordpress paginated list of terms showing wrong number of pages?

I've created a paginated list of terms for a custom taxonomy, but the pagination is not showing correctly. No matter how many posts per page I set, only two pages are output. So with 6 posts and set to 6 per page, I see two pages, the second one…
jasonbradberry
  • 805
  • 2
  • 17
  • 30
4
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
  • 468
  • 3
  • 8
  • 20
1 2
3
71 72