Hi Colin,
The url should be given in $large_image_url[0]
. (see codex for wp_get_attachment_image_src()
).

Stephen Harris
I’m making this confusing by not posting the whole code snippet. Here it is:
<?php if ( has_post_thumbnail( $upstairs_event->ID ) ) {
$large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'large');
echo '<figure class="venue-flyer">';
echo get_the_post_thumbnail( $upstairs_event->ID , 'home');
echo '</figure>';
} ?>
The problem I’m having is in returning the URL for the large featured image in the link so that I can lightbox it. I’m not sure how to get the proper $attachment_id, and it isn’t working with with get_post_thumbnail_id, presumably because we’re outside the loop.

Colin Frangos
Try:
<?php
if ( has_post_thumbnail( $upstairs_event->ID ) ) {
$large_image_src = wp_get_attachment_image_src( get_post_thumbnail_id( $upstairs_event->ID ), 'large');
$large_image_url = $large_image_src[0];
echo '<figure class="venue-flyer">';
echo get_the_post_thumbnail( $upstairs_event->ID , 'home');
echo '</figure>';
}
?>

Stephen Harris
This works – thanks for your patience. My original error was pretty obvious after a weekend off.

Colin Frangos