Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Template Name: Page for work
- *
- */
- ?>
- <?php get_header(); ?>
- <div id="container">
- <div id="content">
- <?php
- $page = 1;
- $type = 'work';
- $args=array(
- 'post_type' => $type,
- 'post_status' => 'publish',
- 'paged' => $page,
- 'posts_per_page' => 9,
- );
- $temp = $wp_query; // assign orginal query to temp variable for later use
- $wp_query = new WP_Query($args);
- ?>
- <button class="prev"><<</button>
- <button class="next">>></button>
- <div id="workCarousel">
- <ul id="workGrid">
- <li class="workitems">
- <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
- <div class="workitem">
- <a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark">
- <?php
- if ( has_post_thumbnail() ) {
- the_post_thumbnail( 'single-work-thumbnail' );
- } else {
- echo ("<img width='330' height='240' src='test.jpg'>");
- }
- ?>
- <span class="info"><?php the_title(); ?></span></a>
- </div>
- <?php endwhile; // end of the loop. ?>
- </li>
- </ul> <!-- #workGrid -->
- </div> <!-- #workCarousel -->
- </div><!-- #content -->
- </div><!-- #container -->
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement