WordPress.org

Ready to get started?Download WordPress

Forums

Multiple Post Thumbnails
[resolved] Fancybox Help (2 posts)

  1. welshhuw
    Member
    Posted 2 years ago #

    Hi,

    How can I get the thumbnails to appear in Fancybox?

    I am using this snippet to display the 'normal' Featured Image:

    <?php $image_url = wp_get_attachment_url( get_post_thumbnail_id($post->ID) ); ?>
    		<a class="fancybox" href="<?php echo $image_url; ?>" alt="<?php the_title(); ?>">
    			<?php the_post_thumbnail( 'projects-larger-thumbnail'); ?>
    		</a>

    And this is the code I have for the Secondary Thumbnail:

    <?php if (class_exists('MultiPostThumbnails')
        && MultiPostThumbnails::has_post_thumbnail('projects', 'secondary-image')) :
            MultiPostThumbnails::the_post_thumbnail('projects', 'secondary-image', NULL, 'projects-secondary-image-thumbnail'); endif; ?>

    Thanks in advance

  2. welshhuw
    Member
    Posted 2 years ago #

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic