How about text above and below a gallery?

In the past I’ve seen a number of queries in the forum about how to have text both above and below the thumbnails in an album. This is actually pretty easy to accomplish using jQuery. First you add a bit of script via phplugins, using the ttg_scripts hook, that will place an element with a specific class where you direct it. Then, when you write your album text, wrap the part that will be moved in a div with that specific class.

First, the script. Add this to the ttg_scripts hook in your phplugins file. See the phplugins documentation for how to do this.

<!-- Use the .after-text class to move album text below a gallery or slide show, after the .the__gallery div -->

When you add text to the either the album template or the album itself, use html and wrap the text with a div that has the class “after-text”. Like so:

<div class="after-text">
<h3>A heading</h3>
<p>Your text.....</p>
<p>Another paragraph...</p>

See this page for an example.
You can then style the text as needed using the .after-text class. For example, adding some left and right padding so the text will line up with other text on the page:

.after-text {
padding: 0 24px;

Leave a Reply

Your email address will not be published. Required fields are marked *

About this site

This site is: a repository of time-savers and best practices from a user's perspective, picked up from several years of using TTG plugins.
This site is not: a support site.
Read more here.

Tip Jar

If this site has saved you some time, kept your hair attached, or otherwise prevented you from tossing the mouse through the monitor, feel free to donate.


Highly recommended. This is my go-to Lightroom book. Click on the book image. (affiliate link)

Affiliate link!

Current TTG versions

Backlight Versions

Backlight 1.2.3
Pages module 1.2.3
Cart Add-on 4.1.5
Client Response Add-on 7.1.2
Theater Add-on 1.2.4
WordPress Add-on 1.2.3
Publisher 3.2.2

CE4 Versions

TTG-BE: 2.0.5a
Autoindex: 7.0.8
Cart: 3.1.4a
CRG: 6.1.3a
Gallery: 6.1.9
Pages: 7.0.15
Publisher: 2.3.3
Stage: 6.1.6
Theme for WordPress: 3.1.2

Subscribe to new posts