Title: Additional Fields
Last modified: August 31, 2016

---

# Additional Fields

 *  [alexlana](https://wordpress.org/support/users/alexlana/)
 * (@alexlana)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/additional-fields-17/)
 * Hi!
 * Google Merchant require some extra fields for some categories, like gender, color
   and age group.
 * Do you provide a way to fill this fields on the future? If you can create an 
   extra field for product attributes to connect the attribute value to this fields,
   it will work.
 * Or maybe provide some hook and a way to change the XML template…
 * But I do that and it worked for me. At least until the next plugin update. 🙂
 * 1. create product attributes (reference: [https://support.google.com/merchants/answer/188494?hl=en](https://support.google.com/merchants/answer/188494?hl=en)):
   
   a. Color, with slug ‘color’; b. Gender, with slug ‘gender’; b.1. options: Male(
   slug ‘male’), Female (‘female’) and Unisex (‘unisex); c. Age Group, with slug‘
   age_group’; c.1. options: Up to 3 months (‘newborn’), between 3-12 months (infant),
   between 1-5 years old (toddler), between 5-13 years old (kids) and Teens or older(
   adult);
 * 2. File tfm-shrike-feed-product.php, line 56, inserted this code:
 *     ```
       $cores_c = get_the_terms( $p->id, 'pa_color');
       			$cores = array();
       			for ($i=0;$i<count($cores_c);$i++)
       				$cores[] = $cores_c[$i]->slug;
       			$cores = implode('/',$cores);
       			$params['color'] = $cores;
       			$gen_c = get_the_terms( $p->id, 'pa_gender');
       			$gens = array();
       			for ($i=0;$i<count($gen_c);$i++)
       				$gens[] = $gen_c[$i]->slug;
       			$gens = implode('/',$gens);
       			$params['gender'] = $gens;
       			$age_c = get_the_terms( $p->id, 'pa_age_group');
       			$age = array();
       			for ($i=0;$i<count($age_c);$i++)
       				$age[] = $age_c[$i]->slug;
       			$age = implode('/',$age);
       			$params['age_group'] = $age;
       ```
   
 * 3. File google-item.xml, line 15, inserted this:
 *     ```
       <g:item_group_id>{{ item_group_id }}</g:item_group_id>
         <g:color>{{ color }}</g:color>
         <g:gender>{{ gender }}</g:gender>
         <g:age_group>{{ age_group }}</g:age_group>
       ```
   
 * [https://wordpress.org/plugins/tfm-google-product-feed/](https://wordpress.org/plugins/tfm-google-product-feed/)

The topic ‘Additional Fields’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/tfm-google-product-feed.svg)
 * [TFM Google Product Feed](https://wordpress.org/plugins/tfm-google-product-feed/)
 * [Support Threads](https://wordpress.org/support/plugin/tfm-google-product-feed/)
 * [Active Topics](https://wordpress.org/support/plugin/tfm-google-product-feed/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/tfm-google-product-feed/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/tfm-google-product-feed/reviews/)

## Tags

 * [Additional Fields](https://wordpress.org/support/topic-tag/additional-fields/)
 * [color](https://wordpress.org/support/topic-tag/color/)
 * [gender](https://wordpress.org/support/topic-tag/gender/)

 * 0 replies
 * 1 participant
 * Last reply from: [alexlana](https://wordpress.org/support/users/alexlana/)
 * Last activity: [10 years, 2 months ago](https://wordpress.org/support/topic/additional-fields-17/)
 * Status: not resolved