• Resolved cheeky_aut

    (@cheeky_aut)


    Hello,

    I am looking for some help on the shortcode [mla_gallery]:
    I want to include some useful meta information in the alt attribute of my mla gallery.
    Per default the post title is used, but I want to include attachment title, attachment caption, attachment copyright. This information is also displayed in my lightbox. How can I do this?

    Regards,
    cheeky

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

    (@dglingren)

    Thanks for your question. I want to make sure I understand where you want the additional information to end up. You wrote “This information is also displayed in my lightbox.” Is your lightbox displaying the content of the ALT Text field for your items or is it already displaying the Title, Caption and Copyright values? If so, where is the Copyright value stored?

    I can think of two solutions for your request. First, you could define an MLA IPTC/EXIF mapping rule to populate the items’ ALT Text field with the information you want. Second, you could use the mla_image_alt parameter or a custom markup template to add the information to your [mla_gallery] display. Either way, displaying the information in your lightbox might require some additional work.

    It would be helpful to know what lightbox you are using and to see the full source text of the [mla_gallery] shortcodes you are using. Any additional details you can provide will help me give you more specific guidance. Thanks for your interest in the plugin.

    Thread Starter cheeky_aut

    (@cheeky_aut)

    Hi David,

    thanks for your cool plugin and your quick answer.

    I want to use default media library assistent properties of attachments and it needs to fill the title attribute (sorry my fault, not alt):

    title = title of the image
    caption = caption of the image
    description = copyright of the image

    mla_image_alt seems no option as it should be different for every image and with this attribute I can set it for the whole gallery.

    Would be great if you can help me fix this.

    Regards,
    cheeky

    Plugin Author David Lingren

    (@dglingren)

    Thanks for the positive feedback and your additional information. I am still not sure whether you want to alter the Title value stored in the database for each item or simply change the caption shown in the gallery display. If it’s the latter, here is a simple example you can adapt to your purposes:

    [mla_gallery post_parent=all posts_per_page=10 orderby=date order=DESC mla_caption="{+title+}, {+caption+}, {+description+}"]
    

    The above example displays the ten most recent images for test purposes. The mla_caption parameter fills the caption below each image thumbnail with the three values you listed. The mla_image_alt would work in a similar fashion (but would fill the alt= attribute in the img HTML tag), and it would be different for every image. Give it a try and let me know if I’m on the right track.

    Thread Starter cheeky_aut

    (@cheeky_aut)

    Thanks, the options for mla_image_alt and mla_image_attributes were quite helpful. That fixed my problem! Keep up the good work, appreciate your quick feedback!

    Plugin Author David Lingren

    (@dglingren)

    Thanks for confirming that my suggestions were helpful, and thanks for the kind words.

    I am marking this topic resolved, but please update it if you have problems or further questions regarding [mla_gallery] parameters for customizing the gallery display content.

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

The topic ‘Change alt attribute for [mla_gallery]’ is closed to new replies.