Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /* create query */
- $gallery = $wp_query;
- $wp_query = null;
- $wp_query = new WP_Query();
- $wp_query -> query("category_name=photos&showposts=12&paged=".$paged);
- /* begin loop */
- if ( have_posts() ) : while ($wp_query -> have_posts()) : $wp_query -> the_post();
- ?>
- <a href="<?php $thumb = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'gallery-full' ); $url = $thumb['0']; echo $url; ?>" class="thickbox" title="<?php the_title(); ?>" alt="<?php the_title(); ?>"><?php the_post_thumbnail("gallery-thumbnail", array("title" => get_the_title(), "alt" => get_the_title()) ); ?></a>
- <?php endwhile; endif; ?>
- <?php if ( $prev = get_previous_posts_link("Previous Page") ) { ?>
- <div class="button"><?php echo $prev ?></div>
- <?php } ?>
- <?php if ( $next = get_next_posts_link("Next Page") ) { ?>
- <div class="button"><?php echo $next ?></div>
- <?php } ?>
- <?php $wp_query = null; $wp_query = $gallery;?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement