Ok ora ignorate la prima parte della mia domanda. Mi piacerebbe riuscire a capire come mai non riesco ad inviare l'informazione dell'src riguardo la seconda immagine (che ho chiamato snapshot nel mio codice), su una pagina esterna dinamica.


$post_title = get_the_title();
$theplot = get_post_meta($post->ID, 'book_plot', true);
$poster_id = get_post_thumbnail_id();
$poster_src = wp_get_attachment_image_src($poster_id,'medium', true);

snapshot($post_id) {
global $post;
$thumbnail_ID = get_post_thumbnail_id();
$images = get_children( array('post_parent' => $post_id, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID') );
if ($images) :
foreach ($images as $attachment_id => $image) :
if ( $image->ID != $thumbnail_ID ) :
$img_alt = get_post_meta($attachment_id, '_wp_attachment_image_alt', true); //alt
if ($img_alt == '') : $img_alt = $image->post_title; endif;
$big_array = image_downsize( $image->ID, 'large' );
$img_url = $big_array[0];
echo $img_url;
endif; endforeach; endif; }

$send = 'http://mywebsite.com/show/?title='. urlencode($post_title) . '&plot='. urlencode($theplot) . '&image='. ($poster_src[0]) . '&year='. ($fanny) . '&snapshot='. (snapshot("$post->ID"));