Skip to main content
deleted 96 characters in body; edited tags; edited title
Source Link

List of WooCommerce productspost categories only associated to another custom taxonomy

I've got a custom taxonomy "sector" associated to WooCommerce products; of course each productsposts; posts are assigned to the default Product categories ("product_cat") as well. What I'd like to achieve is to show in a custom sidebar a list of "Product category""categories" link/name, the productpost of which are assigned to the selected "sector".

Eg.: say that my data arare organized like this (hope this make sense), with three productsposts associated to a various "Product categories"categories AND to a particular sector:

ProductPost 1

  • product_catcategory: category_1
  • sector: sector_1

ProductPost 2

  • product_catcategory: category_2
  • sector: sector_1

ProductPost 3

  • product_catcategory: category_3
  • sector: sector_1

Now, when I'm in the "sector_1" archive page, in the sidebar I'd like to show the following list:

  • category_1
  • category_2
  • category_3

Is this possible? Maybe using tax_query or other methods?

List of WooCommerce products categories only associated to another custom taxonomy

I've got a custom taxonomy "sector" associated to WooCommerce products; of course each products are assigned to the default Product categories ("product_cat") as well. What I'd like to achieve is to show in a custom sidebar a list of "Product category" link/name, the product of which are assigned to the selected "sector".

Eg.: say that my data ar organized like this (hope this make sense), with three products associated to a various "Product categories" AND to a particular sector:

Product 1

  • product_cat: category_1
  • sector: sector_1

Product 2

  • product_cat: category_2
  • sector: sector_1

Product 3

  • product_cat: category_3
  • sector: sector_1

Now, when I'm in the "sector_1" archive page, in the sidebar I'd like to show the following list:

  • category_1
  • category_2
  • category_3

Is this possible? Maybe using tax_query or other methods?

List of post categories only associated to another custom taxonomy

I've got a custom taxonomy "sector" associated to posts; posts are assigned to the default categories as well. What I'd like to achieve is to show in a custom sidebar a list of "categories" link/name, the post of which are assigned to the selected "sector".

Eg.: say that my data are organized like this (hope this make sense), with three posts associated to a various categories AND to a particular sector:

Post 1

  • category: category_1
  • sector: sector_1

Post 2

  • category: category_2
  • sector: sector_1

Post 3

  • category: category_3
  • sector: sector_1

Now, when I'm in the "sector_1" archive page, in the sidebar I'd like to show the following list:

  • category_1
  • category_2
  • category_3

Is this possible? Maybe using tax_query or other methods?

edited tags
Link
vancoder
  • 7.9k
  • 27
  • 35
Source Link

List of WooCommerce products categories only associated to another custom taxonomy

I've got a custom taxonomy "sector" associated to WooCommerce products; of course each products are assigned to the default Product categories ("product_cat") as well. What I'd like to achieve is to show in a custom sidebar a list of "Product category" link/name, the product of which are assigned to the selected "sector".

Eg.: say that my data ar organized like this (hope this make sense), with three products associated to a various "Product categories" AND to a particular sector:

Product 1

  • product_cat: category_1
  • sector: sector_1

Product 2

  • product_cat: category_2
  • sector: sector_1

Product 3

  • product_cat: category_3
  • sector: sector_1

Now, when I'm in the "sector_1" archive page, in the sidebar I'd like to show the following list:

  • category_1
  • category_2
  • category_3

Is this possible? Maybe using tax_query or other methods?