• Resolved riclefebvre

    (@riclefebvre)


    Hi Peter,

    I’m using Standard Field Mapping to map some of my custom fields into the media Caption field so I can display this information with the image in my galleries. The photos in the gallery come from different users of my site. I would like to include the Author name into the Caption but so far I have not figured out how to do it.

    Can you let me know if it is possible and, if yes, how to do it?

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author David Lingren

    (@dglingren)

    Thanks for your question, which is a variation on this earlier support topic:

    Automatically adding the author as a category

    The example plugin developed for that topic will work in your application as well. To find the example plugin, navigate to the Settings/Media Library Assistant Documentation tab and click the new “Example Plugins” button. Enter “substitution” in the text box and click “Search Plugins”. You should see the example plugin.

    The “MLA Substitution Parameter Hooks Example” plugin is the one you want. You can hover over the plugin name and click the “Install” rollover action to add it to your site. Then, go to the Plugins/Installed Plugins admin submenu, find the plugin and activate it. Once the example plugin is activated you can use a Content Template in you mapping rule, something like:

    
    template:[+author:first_name+] [+author:last_name+]
    

    You can access most of the Public Properties of the WP_User class as described in the Class Reference/WP User Codex article.

    I am marking this topic resolved, but please update it if you have any problems or further questions regarding the above solution. Thanks for your interest in the plugin.

    David

    • This reply was modified 8 years, 4 months ago by David Lingren.
    Thread Starter riclefebvre

    (@riclefebvre)

    Thanks Peter,

    As usual you nailed it. This is exactly what I’m looking for.

    Richard

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Map Author name into Caption field’ is closed to new replies.