Youtube link for make it easy to understand : http://www.youtube.com/watch?v=9by-igzg6Ms
I just need a group of images in wordpress so i could link images with next one. I am not professional in Wordpress, i am getting a problem while creating custom wordpress gallery plugins, please help me if any one can it's last day of my project and i have tried most of articles, stackoverflow question and answer but got nothing related to this.
Here is code also i am getting issue while more page button but that might be because i haven't created page for that.
function add_gallery_shortcode($atts, $content = null) {
$a = shortcode_atts(array(
'gallery_name' => '',
'sub_gallery' => '',
'per_page' => 4,
), $atts);
$paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1;
$args = array('post_type' => $a['gallery_name'], 'posts_per_page' => $a['per_page'], 'paged' => $paged);
$loop = new WP_Query($args);
?>
<?php while ($loop->have_posts()) : $loop->the_post(); ?>
<?php echo '<div class="thumbs">' . wp_get_attachment_link(get_post_thumbnail_id(), 'thumbnail') . '</div>';
endwhile;
echo '<div id="nav_next_previous">
<div id="next">' .
next_posts_link('More »', $loop->max_num_pages) . '
</div>
<div id="prev">' .
previous_posts_link('« Previous', $loop->max_num_pages) . '
</div>
</div><!-- thumbs-nextpage-wrap close-->';}
I am also attaching youtube video link how it will be looks like, i don't know how i can create link for next group of images. if there will be any free plugin for that will be also helpful.
Thanks