Support » Plugin: Media Library Assistant » Mapping xmp template data to existing fields

  • Resolved miarr0wporg


    Hello David,
    I am very sorry to bother you again. I have to admit that I feel quite intimidated and overwhelmed by the amount of knowledge that is necessary to understand the help and custom field mapping – or to decide which part of the information and additional references are relevant to make the right decision. Since it says “there’s no undo” in the help I am afraid to just try something.
    What I want to do is map metadata fields (imported via xmp template into files) to existing fields, description and caption.
    link to image
    This would be [+xmp:title+] and [+xmp:description+], right? The title should be the image caption.
    I want to map the fields automatically on upload if the data is available, but not every file has that information stored in the file. My problem is that I am not sure where to map the fields. If I use the dropdown in the settings, I don’t get the caption and description fields (or rather there are two caption fields 2#120 and 2#122). They are displayed on the right, but I am not sure if I should edit them there and what will happen if I do.
    link to image

    There is probably no video by any chance that shows how to go about the more basic stuff and what effect it’ll have? I think something like that would be a great help for people who have not touched a line of code before and can’t judge what will happen if they do. I am sorry if I need help with the help, but there is so much information leading to even more information that I spent the last week just reading, and I am still not sure if I know enough to be sure I understand your help and all the consequences editing will have.

    • This topic was modified 1 year, 6 months ago by miarr0wporg.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author David Lingren


    Good to hear from you again – it’s never a bother to answer a support question. I know the documentation is more reference than tutorial and I wish I had the time and talent to produce more accessible material, like videos.

    If I am reading the xmp data in your first link correctly, I believe you have the substitution sources right: [+xmp:title+] and [+xmp:description+] should work.

    Looking at your second link, I see you have checked the “Enable IPTC/EXIF Mapping when adding new media” option. That should map the fields automatically when new images are added.

    For your rule you need to use a Content Template, which will let you specify the source of the data and only populate the Caption when the file contains the data. Here’s the template you want:


    The template: prefix distinguishes your template from an EXIF value, which is the default content in the EXIF/Template text box. The parentheses around the data source test for a non-blank value in the image file before applying the template.

    You have circled the Caption rule – that’s correct. If you click the “Edit” or “Quick Edit” links (in blue under the rule name) you can create the rule you want. You will see six fields to complete along with Cancel and Update buttons. For the six fields you can enter something like this:

    • Name (or Quick Edit:) – this will be “Caption”, the rule name. You can’t change it.
    • IPTC Value – Leave this set to “– None (select a value) –“. The 2#120 and 2#122 values you mentioned refer to IPTC data contained in the image file; they would be a value you are mapping into the Caption from the file. You don’t use them, so you can ignore them.
    • EXIF/Template Value – Enter template:([+xmp:title+]). See above for an explanation.
    • Priority – Select “EXIF”, although either choice would work in your case.
    • Existing Text – Select “Replace”. WordPress sometimes creates Caption values from image metadata. You want your XMP value to be used every time it is available.
    • Status – Select “Active” so the rule will be applied for uploads and other mapping actions.

    When you’ve entered the values, click “Update” to record them and activate the rule. No mapping will occur at this point, you are just saving your rule for later use.

    Once you define a rule you can apply it to a single item, multiple items or all items:

    • To map a single item, go to the Media/Assistant submenu and click the thumbnail of the item you want (or click the “Edit” rollover action) to get the Media/Edit Media screen. You can click the “Map IPTC/EXIF metadata” link to run your rules on this item, then scroll down and look at the “Caption” meta box to inspect the results.
    • To map two or more items, go to the Media/Assistant submenu and click the checkbox next to the items you want. Then, select “Edit” from the “Bulk Actions” dropdown above the checkboxes and click “Apply” to open the Bulk Edit area. Click the “Map IPTC/EXIF metadata” button to run your rules on the selected items.
    • To map all of your items, stay on the Settings/Media Library Assistant IPTC/EXIF tab and click the “Execute” rollover action for the Caption rule. This may take a while.

    You wrote “it says “there’s no undo” in the help“. That’s true, but you have control over when the rule is applied and how many items is affects. You can pick one image you know has the data present and then use the Media/Edit Media screen to test the rule on just that one item. When you’re confident the rule is working you can use the other two techniques to apply it to several or all items.

    I appreciate the effort you’ve put in to study the Documentation and Help information and I am happy to give you more specific help as you need it. I am marking this topic resolved, but please update it if you have any problems or further questions regarding the above suggestions. Thanks for your continuing interest in the plugin.

    Thread Starter miarr0wporg


    Thank you so much, this was exactly what I needed. I always read the documentation, and your’s has already been very helpful. I might be a bit OCD about knowing exactly how things work and why, and if you try to understand all the referenced material about custom fields and such, it’s a bit confusing. Your answer provided just the frame to narrow it down to the relevant parts.

    Plugin Author David Lingren


    Thanks for the positive feedback and for your MLA review as well; all great motivators to keep working on the plugin and supporting its users.

    I am happy the additional material gave you more confidence and a better understanding of the mapping rules and process. I will review the documentation to see how I can incorporate some of the points in this topic.

    Thread Starter miarr0wporg


    My pleasure 🙂
    I already followed your instructions and it works perfectly fine. Thanks again for your kind and detailed answer.

    It’s probably difficult for somebody who can think in code to imagine how simplified instructions should be. I guess it’s not easy to find a balance between too much and not as detailed as might be needed in some cases.

    What complicated the matter in my case is that I just started using WordPress, and I guess some of those who learn how to use MLA have to learn how to use WordPress at the same time. Both interact and overlap, and it might be difficult to keep both apart and concentrate on one specific functionality and what is needed to make it work.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Mapping xmp template data to existing fields’ is closed to new replies.