We might consider this feature for the pro version of the plugin to be released soon…
In the mean while, you can do the following: When adding a picture (either uploading a new one or selected one from your library), you will see a little form in the WordPress Media Uploader that will let you add a name, caption, alternative text and description to you image… Add the wanted text in the description and then customize the view template (as stated in the documentation) as follows:
Something like this:
<div class="post-gallery">
<?php foreach ( $post->gallery as $attachment ) : ?>
<a href="<?php echo $attachment->url ?>"
data-lightbox="post-gallery-<?php echo $post->ID ?>"
<?php if ( $attachment->caption ) : ?>
data-title="<?php echo $attachment->caption ?>"
<?php endif ?>
>
<img src="<?php echo $attachment->thumb_url ?>"
alt="<?php echo $attachment->alt ?>"
/>
<?php if ( $attachment->post_content ) : ?>
<span class="description">
<?php echo $attachment->post_content ?>
</span>
<?php endif ?>
</a>
<?php endforeach ?>
</div>
You will need to add CSS to adjust it to your needs. Although this will only be added in the thumbs, not in the lightbox.
-
This reply was modified 8 years, 3 months ago by
10Quality.
-
This reply was modified 8 years, 3 months ago by
10Quality.
-
This reply was modified 8 years, 3 months ago by
10Quality.
thanks for answer. but. i want add front end form.
ex: if u open this link. u will see
https://premium.wpmudev.org/blog/wp-content/uploads/2012/08/client-file-share.png
Hi @polatsedat
Our PRO extension supports customizable text overlays (text over the image).
Here is the link for if you are interested:
https://www.10quality.com/product/post-gallery-pro/
-
This reply was modified 8 years, 3 months ago by
10Quality.