Text in Pretty Photo

pending (5 posts) (3 voices)

  1. SteveRem

    Does anyone know if there's a way to get some text from a post to appear in the Prettyphoto box. I have a portfolio page and all the images appear in the prettyPhoto box, which is great, I just wish there was some way to get something (excerpt, body text, teaser text, etc.) to appear in the prettyPhoto box as a caption with the picture. Thanks for your help.


    Posted 7 years ago #
  2. Uniq

    Hello Steve,

    It can be done, but I'd like to know for which particular section of the site you'd like to add captions to the images. If you need for every single image, just let me know, and I'll come up with a tweak for you.

    If you think you can handle this by yourself, here are the instructions:

    You can also add a title and a description to your picture:
    To have display a title, add the title into the ALT attribute or your thumbnail image.
    To have display a description, add the description into the TITLE attribute or your link.

    I guess it would be the best to let me know so I can modify the files and upload them here, maybe someone else could use them aswell.


    Posted 7 years ago #
  3. SteveRem


    Thanks. Right now I have a portfolio gallery with 131 pictures and growing (I'm using it to build a user-generated photo gallery) so if there was any way to make a custom field that would display in the prettyphoto box or something for every image, that would be great. I saw that you could add a title attribute thumbnails, but right now, i have no control over the thumbnail code since it's being generated by the gallery shortcode. I bascially want a slideshow, but want the teaser text or body text to appear in the box at this address: http://www.shootforgood.org/gallery Thanks for your help.


    Posted 7 years ago #
  4. Uniq

    Hello Steve,

    So I'll do a tweak for the gallery images, but let me know if you want a custom field to be there, or the excerpt / title to be shown. I need to know this, so I know how to do this.


    Posted 7 years ago #
  5. trancedrumer

    Hi, I am interested in this functionality. WP by default offers to fill caption that will be shown under the image, but in this case the image will not be opened in nice lightbox. WP default is just to open page only with image. So would be nice to have a shortcode parameter where to fill an image caption like in wp by default.

    inFocus ecample:

    <span class="shadow_frame alignright"><a rel="prettyPhoto" href="http://domain.com/wp-content/uploads/2015/08/popular-on.jpg" title="Popular on"><img class="framed" src="http://domain.com/wp-content/themes/infocus/lib/scripts/timthumb/thumb.php?src=http://domain.com/wp-content/uploads/2015/08/popular-on.jpg&w=300&h=450&zc=1&q=100" title="Popular on" alt="Popular on" width="300" height="450"></a><img alt="" src="http://domain.com/wp-content/themes/infocus/images/shortcodes/image_shadow.png" style="width:300px;" class="image_shadow"></span>

    WP default: Example with url in caption:

    <div id="attachment_271" style="width: 310px" class="wp-caption alignright"><a href="http://domain.com/wp-content/uploads/2015/08/popular-on.jpg"><img class="wp-image-271" src="http://domain.com/wp-content/uploads/2015/08/popular-on-200x300.jpg" alt="Popular on" width="300" height="450"></a><p class="wp-caption-text"><a href="http://domain.com/test" rel="nofollow">Popular on</a>test</p></div>
    Posted 2 years ago #


You must log in to post.

Construct WordPress Theme
Construct wordpress theme
Myriad WordPress Theme
Myriad wordpress theme
Method WordPress Theme
Method wordpress theme
Fusion WordPress Theme
Fusion wordpress theme
Elegance WordPress Theme
Elegance wordpress theme
Echelon WordPress Theme
Echelon wordpress theme
Dejavu WordPress Theme
Dejavu wordpress theme
Modular WordPress Theme
Modular wordpress theme