Title: IPTC &amp; EXIF Processing &amp; Att. Categories
Last modified: March 7, 2017

---

# IPTC & EXIF Processing & Att. Categories

 *  Resolved anonymized-15301845
 * (@anonymized-15301845)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/iptc-exif-processing-att-categories/)
 * Hi David !
 * I configured MLA plugin to automatically add Att. Categories from IPTC value “
   2#025 keywords” when importing media. I also classified all these Att. Categories
   by feature, let me explain:
 * All my medias have height filled up in keywords like “1800H”, “1900H”, … I put
   these height in a parent named “Height”, which gives me:
    Height – 1800H – 1900H–…
 * This configuration allows me to to display Att. Categories with `mla_term_list`,
   and to exclude those parent with their children easily (without to write each
   term id but only by adding parent term id to the exclude parameter).
 * The problem is, when I import a media with “1800H” keyword and this att categories
   alredy exists but is a child of parent Height, it creates a new one, which is
   not the behavior I expect. Is it possible to do that ?
 * Thanks!
    -  This topic was modified 9 years, 2 months ago by anonymized-15301845.

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

 *  Plugin Author [David Lingren](https://wordpress.org/support/users/dglingren/)
 * (@dglingren)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/iptc-exif-processing-att-categories/#post-8886122)
 * Thanks for your question and for all the details of your application.
 * As you discovered, WordPress hierarchical taxonomies allow terms with the same
   name/label to appear as root terms or child terms. You could change your mapping
   rule and set the parent to “Height”, but then ALL of the IPTC Keywords would 
   become child terms of the Height parent. As I recall, you have other parent/child
   relationships mixed in as Keyword values; is that right?
 * If all of your Keywords are unique, a workable solution would be to first search
   the taxonomy for an existing term with a matching name and use it if it exists.
   If not, the new term could be added as a root term or, perhaps, under the term
   you set in the Parent field in the mapping rule. This would require some PHP 
   code that intercepts the hooks provided by the MLA mapping process.
 * Let me know if my assumptions are correct and if the PHP/hooks solution would
   work for you.
 *  Thread Starter anonymized-15301845
 * (@anonymized-15301845)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/iptc-exif-processing-att-categories/#post-8886373)
 * > As you discovered, WordPress hierarchical taxonomies allow terms with the same
   > name/label to appear as root terms or child terms. You could change your mapping
   > rule and set the parent to “Height”, but then ALL of the IPTC Keywords would
   > become child terms of the Height parent. As I recall, you have other parent/
   > child relationships mixed in as Keyword values; is that right?
 * That’s right.
 * > If all of your Keywords are unique, a workable solution would be to first search
   > the taxonomy for an existing term with a matching name and use it if it exists.
   > If not, the new term could be added as a root term or, perhaps, under the term
   > you set in the Parent field in the mapping rule. This would require some PHP
   > code that intercepts the hooks provided by the MLA mapping process.
   > Let me know if my assumptions are correct and if the PHP/hooks solution would
   > work for you.
 * This solution seems perfect to me ! 🙂
 * Thanks.
 *  Plugin Author [David Lingren](https://wordpress.org/support/users/dglingren/)
 * (@dglingren)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/iptc-exif-processing-att-categories/#post-8897074)
 * Thanks for your patience while I looked into this issue. I decided that the failure
   to locate existing child terms during the mapping process in, in fact, and MLA
   defect. If you do not specify a “Parent” term for a hierarchical taxonomy mapping
   rule an incoming value should match any term with the same name regardless of
   where it occurs in the hierarchy.
 * I have uploaded A new MLA Development Version dated 20170309 that corrects the
   problem and should work the way you intend. To get the Development Version, follow
   the instructions in this earlier topic:
 * [Shortcode not working in (special) widget](https://wordpress.org/support/topic/shortcode-not-working-in-special-widget/?replies=3#post-7753687)
 * It would be great if you can install the Development Version and let me know 
   how it works for you. Thanks for inspiring an MLA fix/enhancement.
 *  Thread Starter anonymized-15301845
 * (@anonymized-15301845)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/iptc-exif-processing-att-categories/#post-8897840)
 * > It would be great if you can install the Development Version and let me know
   > how it works for you.
 * Unfortunately, it’s not working, att. caterogies are still created even if they
   exist. In which file is this code located ? How do you perform search ?
    -  This reply was modified 9 years, 2 months ago by anonymized-15301845.
 *  Thread Starter anonymized-15301845
 * (@anonymized-15301845)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/iptc-exif-processing-att-categories/#post-8906438)
 * It’s working now, thanks David ! 🙂

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

The topic ‘IPTC & EXIF Processing & Att. Categories’ is closed to new replies.

 * ![](https://ps.w.org/media-library-assistant/assets/icon-256x256.png?rev=973502)
 * [Media Library Assistant](https://wordpress.org/plugins/media-library-assistant/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/media-library-assistant/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/media-library-assistant/)
 * [Active Topics](https://wordpress.org/support/plugin/media-library-assistant/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/media-library-assistant/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/media-library-assistant/reviews/)

## Tags

 * [exif](https://wordpress.org/support/topic-tag/exif/)
 * [Import](https://wordpress.org/support/topic-tag/import/)
 * [importing](https://wordpress.org/support/topic-tag/importing/)
 * [iptc](https://wordpress.org/support/topic-tag/iptc/)
 * [media](https://wordpress.org/support/topic-tag/media/)

 * 5 replies
 * 2 participants
 * Last reply from: anonymized-15301845
 * Last activity: [9 years, 2 months ago](https://wordpress.org/support/topic/iptc-exif-processing-att-categories/#post-8906438)
 * Status: resolved