Title: Assign attribute twice
Last modified: December 24, 2020

---

# Assign attribute twice

 *  Resolved [philipprien](https://wordpress.org/support/users/philipprien/)
 * (@philipprien)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/assign-attribute-twice/)
 * Hello dear Woo supporter 🙂
 * Suppose I have a product, a pair of glasses. These glasses gets the property 
   color for creating the variations.
 * Now we have two glasses that are black and differ only in nuances. So I give 
   the attribute black to both glasses. So that customers can filter for black glasses.
 * This does not work like this. When the variations of a product is displayed only
   once black.
 * Anybody have an idea how I can assign an attribute value twice, to different 
   variations.
 * On the product page I have already found a trick. Using foreach loop I search
   the variable $available_variations and append a ‘_’ to the duplicate attributes.
 * Now I have a plugin that displays the variation on the category page.
    Unfortunately,
   the link to this variation, from the category page, looks like this: ‘?attribute_pa_color
   =rose’. Therefore I can’t get to the second variation black, because the link
   looks the same.
 * Happy christmas days!

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [seank123](https://wordpress.org/support/users/seank123/)
 * (@seank123)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/assign-attribute-twice/#post-13839401)
 * How are you setting up the attributes/variations? Are they set up in Products-
   Attributes first? [https://docs.woocommerce.com/document/managing-product-taxonomies/#section-6](https://docs.woocommerce.com/document/managing-product-taxonomies/#section-6)
 *  Thread Starter [philipprien](https://wordpress.org/support/users/philipprien/)
 * (@philipprien)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/assign-attribute-twice/#post-13839432)
 * Thank you for the answer!
    Yes, the attributes are glogal attributes. They are
   set up on “/wp-admin/edit.php?post_type=product&page=product_attributes” like
   your link suggest
 *  [seank123](https://wordpress.org/support/users/seank123/)
 * (@seank123)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/assign-attribute-twice/#post-13839455)
 * And when you entered the colours in the Attributes tab in the product you selected
   you selected the attribute name in the dropdown and not ‘Custom product attribute’
   before clicking Add?
 * [https://docs.woocommerce.com/document/variable-product/#section-3](https://docs.woocommerce.com/document/variable-product/#section-3)
 *  Thread Starter [philipprien](https://wordpress.org/support/users/philipprien/)
 * (@philipprien)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/assign-attribute-twice/#post-13839486)
 * Yes, i use the dropdown like here:
    [https://www.loom.com/share/301c66af9054489fa57047587a433001](https://www.loom.com/share/301c66af9054489fa57047587a433001)
 *  [3 Sons Development](https://wordpress.org/support/users/3sonsdevelopment/)
 * (@3sonsdevelopment)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/assign-attribute-twice/#post-13910003)
 * Hi [@seank123](https://wordpress.org/support/users/seank123/),
 * It’s been a while since we heard from you, so I’m marking this thread resolved.
   Hopefully, you’ve been able to resolve this, but if you haven’t, please let open
   up a new topic and we’ll be happy to help out.
 * Cheers

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Assign attribute twice’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

 * 5 replies
 * 3 participants
 * Last reply from: [3 Sons Development](https://wordpress.org/support/users/3sonsdevelopment/)
 * Last activity: [5 years, 3 months ago](https://wordpress.org/support/topic/assign-attribute-twice/#post-13910003)
 * Status: resolved