• hi there,
    i′m trying to get the easybox image gallery plugin to work on my blog. I only have images as posts with the titel and date. you can see it here: k-im.de/blog .

    now I added the following code to the loop in index.php:

    <?php $thumbID = get_post_thumbnail_id($post->ID); ?>
    <a href="<?php wp_get_attachment_url($thumbID) ?>" title="Permanent Link to <?php the_title_attribute(); ?>" rel="lightbox-gallery1"><?php the_post_thumbnail( 'home' ); ?> </a>

    but what I get as a link is this:

    <a rel="lightbox-gallery1" title="Permanent Link to here is typo" href="">
    <img WORKING IMG LINK />
    </a>

    why is the “a href” link all messed up like that? how can I add the necessary “rel=” tag to the link in the right order?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter kris-11

    (@kris-11)

    just to clarify what i′m trying to do:
    I want the featured image to work as a link for a lightbox plugin. for that i need a “rel=”gallery” or rel=lightbox (depending on plugin) to work. it does work with this theme:

    i tried to add easybox but I can′t get it to work. even If i add the “rel=” attribute manually like in the installation instrudctions for the plugin it doesn′t work. where do I have to add the js script files?

    <?php
    $thumbnail_id=get_the_post_thumbnail($post->ID);
    preg_match ('/src="(.*)" class/',$thumbnail_id,$link);
    echo $link[1];
    ?>
    <a href="<?php echo $link[1]; ?>" rel="lightbox"><?php the_post_thumbnail('thumbnail'); ?></a>

    Try this ….

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘how to add "rel=" to loop for easybox?’ is closed to new replies.