• Resolved vikkineal

    (@vikkineal)


    Hi

    For some reason my code has stopped working for displaying a post thumbnail image in the slimbox – it will, however, show the image in a new window.

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

    Can anyone see anything wrong with the above as I’m really confused.

    Thanks

  • The topic ‘Displaying post thumbnail in slimbox’ is closed to new replies.