Thank you for this question and for taking the time to provide the [mla_gallery]
source code and a link to the page on your site; that’s very helpful.
There are many ways to improve the gallery display along the lines you describe. Here’s an earlier support topic that describes converting the caption into a link:
Wrap image caption with link
Based on that topic, the easy way to convert your entire caption into a link is adding this parameter to your [mla_gallery]
shortcode:
mla_caption="<a href='{+link_url+}' title='{+title+}' target='_blank'>{+caption+}</a>"
The target='_blank'
attribute can also be added to the thumbnail image by adding this parameter to your [mla_gallery]
shortcode:
mla_target="_blank"
Making just the < H2 > portion of the caption into a link is a bit more involved. It looks like this tag is embedded in the Caption field for each document, and the Caption field also includes the descriptive text as well. Is that right? If so, you have at least two alternatives:
- Separate the header from the rest of the text. For example, put just the header text in the Caption field and put the rest of the text in the Description field. This may not be practical, but if you separate the two elements you can easily create a gallery “caption” that has a link for the header and the rest of the text as it is now.
- Write some (straightforward) PHP code and use the “MLA Gallery Filters and Actions (Hooks)” to process the existing Caption content. If this works for you I can be more specific about how to implement it.
Here’s a recent support topic that will give you a better idea about what’s involved in writing a filter:
Format date
The specifics of the filter will be different but the approach is the same. Let me know if you want to pursue that solution.
I will leave this topic unresolved for now. Let me know if the above suggestions work for you, if you have problems or further questions.
Thanks for your interest in the plugin.