I want to display all the images added as gallery in a post with prettyphoto class.
I am using this code.
/* The loop */
while ( have_posts() ) : the_post();
if ( get_post_gallery() ) :
$gallery = get_post_gallery( get_the_ID(), false );
/* Loop through all the image and output them one by one */
foreach( $gallery['src'] AS $src )
<a href="<?php echo $src; ?>" rel="prettyPhoto[pp_gal]"><img src="<?php echo $src; ?>" alt="Gallery image" /></a>
Its is displaying the photos but it is showing only thumbnail as src. I want to display Full Image.
How can i display full image instead of thumbnail ?
TutsPlus did a pretty straightforward article on exactly this a while back. Perhaps you could give it a read and let us know if you run into any problems? This forum is good with problems. The basis of your question is more of a "point me at a tutorial" issue though. Done and done :)
You may need to refer to a code snip like this to get gallery integration though, once you've done the basics.
// Query the custom post type to display
$args = array('post_type' => 'CUSTOM POST TYPE');
$query = new WP_Query( $args );
if ( $query->have_posts() ) : while ( $query->have_posts() ) : $query->the_post();
// your gallery loop
Read the documentation for get_post_gallery and you'll see that the function is intended to return thumbnail image sources. The function also returns a string IDs of images. So you can split it into array, and run wp_get_attachment_link within the same loop (with a defined index to reference correct image file ID) to query for full image source.