Support » Plugin: WordPress Gallery Plugin - NextGEN Gallery » Show title on gallery page, description in lightbox

  • Resolved mpet29

    (@mpet29)


    I have a gallery of four photos (more to come, but four for now.)

    I’m displaying them on my page with

    [ngg_images gallery_ids="1" show_slideshow_link="0" display_type="photocrati-nextgen_basic_thumbnails"]

    That’s fine. They show up. But I’d like to be able to show the title underneath the thumbs on this page, and still have the longer description appear in the lightbox pop up. So maybe you’d see “Mom & dad” as the title, then “here’s mom & dad having a great time at the beach” in the lightbox.

    Seems like that should be pretty straight-forward, how can that be done?

    https://wordpress.org/plugins/nextgen-gallery/

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author photocrati

    (@photocrati)

    @mpet29 – You can choose an appropriate Lightbox Effect that will show the image caption (read: description) but to show the image title you will need to use a custom template that displays the image title.

    You can then use a modified version of your shortcode such as something like this:
    [ngg_images gallery_ids="1" show_slideshow_link="0" display_type="photocrati-nextgen_basic_thumbnails" template=gallery-with-title"]

    NB: The template is based on using the file name gallery-with-title.php

    – Cais.

    Thanks. Where are the instructions to create a custom template? Can I do that if I have access to edit PHP through the WordPress editor, but not full FTP access to upload a new PHP file?

    Plugin Author photocrati

    (@photocrati)

    @mpet29 – You can find information about custom templates here: http://www.nextgen-gallery.com/templates/

    If you do not have access to create/add new files to the server then your only option would be to modify an existing template (which is not upgrade safe … or generally recommended).

    – Cais.

    I appreciate the quick reply. It does seem odd to me that something as simple as “show the name of the picture” isn’t natively supported and requires custom work. I’ll give a shot, but may end up finding a different solution. Thanks for your help.

    Plugin Author photocrati

    (@photocrati)

    @mpet29 – It’s generally a very easy modification to make … if you have any problems with this specific modification please let us know.

    – Cais.

    Thanks. I see how to edit the templates, and I see tutorials for changing some CSS stuff (rounded corners, etc.) but is there one that says what I need to do in order to get the title to appear?

    Plugin Author photocrati

    (@photocrati)

    Change products/photocrati_nextgen/modules/ngglegacy/view/gallery-caption.php:55

    <span><?php echo $image->caption ?></span>

    … to:

    <span><?php echo $image->alttext ?></span>

    That should do what you are looking for.

    – Cais.

    Thanks! I did that, but it doesn’t appear to have changed anything. Is there a different way to call it other than
    [ngg_images gallery_ids="1" show_slideshow_link="0" display_type="photocrati-nextgen_basic_thumbnails"]

    I see you did the template name above, but I don’t think that applies with the minor PHP change, right?

    Nevermind! Figured it out. Didn’t realize that you also had to go into the gallery settings and change the template there. Thanks.

    Plugin Author photocrati

    (@photocrati)

    @mpet29 – Yes, shortcode structures read the settings under Gallery > Gallery Settings for their display layouts.

    Thanks for the follow-up!

    – Cais.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Show title on gallery page, description in lightbox’ is closed to new replies.