• richardquay

    (@richardquay)


    I am building a portfolio page with custom fields for the title and tme small image location. I am sure there is a better way to do this. But for now this will work.

    I am trying to put lightbox, so when you click on the image the lightbox takes over and enlarge the image.

    this is the code:
    <div class=”workBoxFirst”>
    <?php $image = get_post_meta($post->ID, ‘webWork_1’, true); ?>
    <?php $link = get_post_meta($post->ID, ‘webWorkLink_1’, true); ?>
    ” rel=”lightbox[]”><img src=”<?php echo($image);?>” alt=”recent work” />
    <span><?php $title = get_post_meta($post->ID, ‘webWorkTitle_1’, true); ?> <?php echo($title);?> </span>

    ———
    I am not sure how to how to link it to lightbox, I have rel=”lightbox[]”, does anyone know what I can put into the rel to make it to work?

Viewing 1 replies (of 1 total)
  • evangsharp

    (@evangsharp)

    Couple of things mate:

    1) The rel invocation doesn’t have square brackets. Its just

    rel=”lightbox”

    2) This needs to be placed in the anchor tag around the image you want to pop out, along with the standard href variable that leads to the file. I can’t tell what you’re writing there from so few lines, but wherever you’re generating the , just nip #1 in there.

    Hope that helps!

    Evan

Viewing 1 replies (of 1 total)
  • The topic ‘lightbox v.3 and wordpress 2.5 custom fields’ is closed to new replies.