Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- Template Name: Stock Art
- */
- ?>
- <?php
- /**
- * The template for displaying Archive pages.
- *
- * Used to display archive-type pages if nothing more specific matches a query.
- * For example, puts together date-based pages if no date.php file exists.
- *
- * Learn more: http://codex.wordpress.org/Template_Hierarchy
- *
- * @package WordPress
- * @subpackage Twenty_Ten
- * @since Twenty Ten 1.0
- */
- get_header(); ?>
- <div id="container">
- <div id="content" role="main">
- <h1 class="entry-title" align="center">
- Stock Illustration - Coghill Cartooning
- </h1>
- <!-- thumbnail grid code grabbed here: http://return-true.com/2010/05/creating-a-post-thumbnail-grid-in-wordpress/ -->
- <div id="gridContainer" align="center">
- <?php
- $c = 1; //init counter
- $bpr = 3; //boxes per row
- query_posts( $query_string . '&posts_per_page=21' );
- if(have_posts()) :
- while(have_posts()) :
- the_post();
- ?>
- <div class="image-grid" id="post-<?php the_ID(); ?>">
- <div class="postImage">
- <a href="<?php the_permalink(); ?>" title="Cartoon <?php echo get_post_meta( get_the_ID(), 'stock-art-name', true ); ?> clipart"><?php the_post_thumbnail('thumbnail'); ?></a>
- <h1 class="page-title"><a href="<?php the_permalink(); ?>" title="Cartoon <?php echo get_post_meta( get_the_ID(), 'stock-art-name', true ); ?> clipart "><?php echo get_post_meta( get_the_ID(), 'stock-art-name', true ); ?></a></h1>
- </div>
- </div>
- <?php
- if($c == $bpr) :
- ?>
- <div class="clr"></div>
- <?php
- $c = 0;
- endif;
- ?>
- <?php
- $c++;
- endwhile;
- endif;
- ?>
- <div class="clr"></div>
- <?php wp_pagenavi(); ?>
- </div>
- </div><!-- #content -->
- </div><!-- #container -->
- <?php get_sidebar(); ?>
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment