BuddyDev

Search

[Resolved] Media Title Not Showing Up Under Thumbnail or in Lightbox

  • Participant
    Level: Enlightened
    Posts: 29
    Simon on #4863

    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!

  • Keymaster
    (BuddyDev Team)
    Posts: 24636
    Brajesh Singh on #4867

    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
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 29
    Simon on #4880

    Hello 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, 3 months ago by Simon.
  • Participant
    Level: Enlightened
    Posts: 29
    Simon on #4884

    Hello Brajesh,

    Good news! I have worked out how to do it using your second approach and also have it working for my gallery shortcodes.

    I am now going to see if I can get the title and media description to appear in the lightbox…

    Thanks for your help!

    Simon

  • Keymaster
    (BuddyDev Team)
    Posts: 24636
    Brajesh Singh on #4893

    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.php

    Hope that helps.
    All the best 🙂

  • Participant
    Level: Enlightened
    Posts: 24
    annelies on #6593

    where can i find the function.php file??

    placed whole template folder of media press in my them folder
    worked out a view css corrections
    but now i need to display the titles

  • Participant
    Level: Enlightened
    Posts: 24
    annelies on #6607

    anyone…. please need a little help
    needles to say i’m not a programmer, but really want this to show up

    the simplest way to do it. Please put it in your functions.php
    add_action(‘mpp_after_media_item’, ‘mpp_media_title’);

    Where is this functions.php??

  • Participant
    Level: Enlightened
    Posts: 29
    Simon on #6609

    Hello Annelies,

    You will find functions.php in your theme folder. If you have a child theme, put a copy of the file in your child theme folder.

  • Participant
    Level: Enlightened
    Posts: 24
    annelies on #6610

    THNX A MILLION

  • Participant
    Level: Enlightened
    Posts: 24
    annelies on #7146

    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.

This topic is: resolved