Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- Template Name: Case Studies
- */
- ?>
- <?php get_header(); ?>
- <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
- <!--BEGIN .portfolio-sidebar -->
- <?php ?>
- <?php endwhile; endif; ?>
- <?php $query = new WP_Query();
- $query->query('post_type=case-studies&posts_per_page=-1'); ?>
- <!--BEGIN #primary .hfeed-->
- <div class="hfeed">
- <!--BEGIN #columns-wrap-->
- <ul>
- <?php $count = 1; ?>
- <?php $odd_or_even = 'odd'; ?>
- <?php if ($query->have_posts()) : while ($query->have_posts()) : $query->the_post();
- $terms = get_the_terms( get_the_ID(), 'skill-type' ); ?>
- <li data-id="id-<?php echo $count; ?>" class="<?php if($terms) : foreach ($terms as $term) { echo 'term-'.$term->term_id.' '; } endif; ?> <?php echo $odd_or_even; ?>">
- <?php
- if ('odd' == $odd_or_even){
- $odd_or_even = 'even';
- }else{
- $odd_or_even = 'odd';
- }
- ?>
- <!--BEGIN .hentry -->
- <div <?php post_class(); ?> id="post-<?php the_ID(); ?>">
- <?php /* if the post has a WP 2.9+ Thumbnail */
- if ( (function_exists('has_post_thumbnail')) && (has_post_thumbnail()) ) { ?>
- <div class="post-thumb">
- <a title="<?php printf(__('Permanent Link to %s', 'framework'), get_the_title()); ?>" href="<?php the_permalink(); ?>"><?php the_post_thumbnail('case-study'); /* post thumbnail settings configured in functions.php */ ?></a>
- </div>
- <?php } ?>
- <div class="entry-wrapper"><h2 class="entry-title"><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s', 'framework'), get_the_title()); ?>"> <?php the_title(); ?></a> <?php edit_post_link( __('edit', 'framework'), '<span class="edit-post">[', ']</span>' ); ?></h2>
- <!--BEGIN .entry-content -->
- <div class="entry-content">
- <?php the_excerpt(); ?>
- <a href="<?php the_permalink(); ?>" class="more-link"><?php _e('Read more...', 'framework'); ?></a>
- <!--END .entry-content -->
- </div>
- </div>
- <!--END .hentry-->
- </div>
- </li><hr />
- <?php $count++; ?>
- <?php endwhile; endif; ?>
- <?php wp_reset_query(); ?>
- <!--END #one-columns-->
- </ul>
- <!--BEGIN .navigation .page-navigation -->
- <div class="navigation page-navigation">
- <?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } else { ?>
- <div class="nav-next"><?php next_posts_link() ?></div>
- <div class="nav-previous"><?php previous_posts_link() ?></div>
- <?php } ?>
- <!--END .navigation .page-navigation -->
- </div>
- <!--END #portfolio-wrap-->
- </div>
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement