WordPress.org

Ready to get started?Download WordPress

Forums

"Get" Uploaded Image Caption for PrettyPhoto "Title" (1 post)

  1. masey
    Member
    Posted 3 years ago #

    I'm going to do my best to communicate my issue here in the hope that someone A. Understands what I'm getting at and B. Can help me out!

    I have a page that lists a bunch of gallery images which I have uploaded to my server using WordPress and added captions to.

    The images can be viewed using the "PrettyPhoto" jQuery script via the following code:

    $lbtitle = get_post_meta(get_the_id(), "_lbtitle", true);
                            $url = get_post_meta(get_the_id(), "_lburl", true);
                            $thumb = get_post_thumbnail_id();
                            if($cols == "0" || $cols == "") {
                                $image = vt_resize( $thumb,'' , 390, 240, true, 70 );
                            } elseif($cols == "One Column") {
                                $image = vt_resize( $thumb,'' , 390, 240, true, 70 );
                            } elseif($cols == "Two Columns") {
                                $image = vt_resize( $thumb,'' , 390, 240, true, 70 );
                            } elseif($cols == "Three Columns") {
                                $image = vt_resize( $thumb,'' , 250, 170, true, 70 );
                            } elseif($cols == "Four Columns") {
                                $image = vt_resize( $thumb,'' , 190, 130, true, 70 );
                            }

    and

    echo '<a href="'.$url.'" rel="prettyPhoto[pp]" title="'.$img[caption].'">
    <img src="'.$image[url].'" width="'.$image[width].'" height="'.$image[height].'" alt="'.$lbtitle.'" /></a>';

    My problem is that I don't have and therefore need a function written to allow for the PrettyPhoto description for each photo (title=" ") to pull in the caption I have written for each uploaded photo via something like:

    '.$img[caption].'

    ...as listed above.

    Does that make sense by any chance? Any help here would be GREATLY appreciated!

Topic Closed

This topic has been closed to new replies.

About this Topic