• rhythmofthecosmos

    (@rhythmofthecosmos)


    Hi,

    I have some thumbnails set up which am trying to get a lightbox plugin to work for.

    Problem is that I only want this to work for certain pages..

    My friend did it for me for another page..

    Using this code

    <div class="small-product-image">
              <?php $image = get_post_meta($post->ID, "thumbnail", true); ?>
              <?php $alt = get_post_meta($post->ID, "altthumbnail", true); ?>
              <a href="<?php echo $image; ?>" rel="lightbox[173]"><img src="<?php echo $image; ?>" alt="<?php echo $alt; ?>" /></a>

    Note the lightbox..

    Now I want to add this to this code..

    <div class="image">
                  <?php $image = get_post_meta($post->ID, "product_listing_img_1", true); ?>
                  <?php $alt = get_post_meta($post->ID, "product_listing_alt_1", true); ?>
                  <?php $link = get_post_meta($post->ID, "product_listing_link_1", true); ?>
                  <a href="<?php echo $link; ?>"><img src="<?php echo $image; ?>" alt="<?php echo $alt; ?>" /></a></div>
                <div class="text">
                  <?php $text = get_post_meta($post->ID, "product_listing_text_1", true); ?>
                  <?php echo $text; ?> </div>
                <div class="name">
                  <?php $name = get_post_meta($post->ID, "product_listing_name_1", true); ?>
                  <a href="<?php echo $link; ?>"><?php echo $name; ?></a> </div>
              </div>

    am unsure about how I would call the lightbox in this..

    Any ideas ?

    Thanks

  • The topic ‘plugin for one page only’ is closed to new replies.