Hello,
I’m a new user of MediaPress and am having trouble showing the media title under the thumbnails in galleries. I am using a grid layout for my gallery. How do I show the media title under the thumbnails? Also, I would like to show the media description and title in the lightbox if possible.
Great plugin!
Thanks!
Hi Simon,
Welcome to BuddyDev.
Thank you for using MediaPress.I am sorry for the inconvenience. We did disable the title in default template sometime ago(on grid pages but kept on single).
There are multiple ways to add it back. Here is the simplest way to do it. Please put it in your functions.php
add_action('mpp_after_media_item', 'mpp_media_title');
All it does is puts the title at the bottom. You may use the action ‘mpp_before_media_item’ to put at the top.
Another way is you can completely control the output of mediapress. All you need to do is create “mediapress” template in your theme or child theme and then copy the relavant files from wp-content/plugins/mediapress/templates/mediapress to hare and modify.
The second approach is best suited for theme authors, since you are looking for small modification, i will suggest using the first approach.
Hope that helps.
Thank you
BrajeshHello Brajesh,
Thank you very much for helping me.
I am very interested in your second approach as it yields more control but I am very much a beginner in this field. If I copied the relevant file to a MediaPress template, would I then simply add the same code that you shared in the first approach to that file and place it in the correct part of the file?
I just used the first way and notice that it works for the normal gallery pages but I need it to work on a page where I have used the gallery shortcode. How would I do this?
I am keen to learn more about this.
Many thanks,
Simon
- This reply was modified 8 years, 4 months ago by Simon.
Thank you Simon.
In the same way you can override all the template(even the lightbox too). The lightbox template is in templates/default/gallery/media/views/lightbox-comment.php.
You can cop that to yourtheme/mediapress/default/gallery/media/views/lightbox-comment.phpHope that helps.
All the best 🙂placed this in my function but i guess there needs to be some extra coding or function
it’s not displaying any titles yet… (http://khmw.winstart.nl/prijsvraag/) with short code [mpp-show-gallery id=38821]add_action(‘mpp_after_media_item’, ‘mpp_media_title’);
/**
* mediapress media titel invoegen.
*
*/
You must be logged in to reply to this topic.