Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /* Template Name: Category Listing */
- get_header();
- if (have_posts()) {
- while (have_posts()) {
- the_post();
- ?>
- <!-- service sidebar -->
- <div id="service-sidebar" class="left">
- <ul class="widgets">
- <li class="widget widget_our_work">
- <div class="title">
- <?php if(is_page( 'Branding' )){?><span class="label">B</span><?php } ?>
- <?php if(is_page( 'Print' )){?><span class="label">P</span><?php } ?>
- <?php if(is_page( 'packing' )){?><span class="label">P</span><?php } ?>
- <?php if(is_page( 'Odds & Ends' )){?><span class="label">O</span><?php } ?>
- <p class="tk-kulturista-web"><span>our work</span>: <?php the_title(); ?></p>
- </div>
- <?php the_content(); ?>
- </li>
- <?php global $post ?>
- <?php query_posts('meta_key=listing_category&meta_value=Print'); ?>
- <?php if (have_posts()) { ?>
- <?php while (have_posts()) { the_post(); ?>
- <li class="widget widget_recent_posts widget_last">
- <h3 class="widgettitle tk-kulturista-web">From the blog</h3>
- <ul>
- <?php foreach ($cat_posts as $i => $cpost): ?>
- <li>
- <?php if (has_post_thumbnail($cpost->ID)): ?>
- <a href="<?php echo get_permalink($cpost->ID); ?>" class="thumb">
- <?php echo get_the_post_thumbnail($cpost->ID, 'post_icon'); ?>
- </a>
- <?php endif ?>
- <div class="entry">
- <span class="date"><?php echo get_the_time('D, j F Y', $cpost->ID); ?></span>
- <h4><a href="<?php echo get_permalink($cpost->ID); ?>"><?php echo get_the_title($cpost->ID); ?></a></h4>
- <?php echo apply_filters('the_content', shortalize($cpost->post_content, 8)); ?>
- </div>
- <div class="cl"> </div>
- </li>
- <?php if ($i+1 < count($cat_posts)): ?>
- <li class="divider"></li>
- <?php endif ?>
- <?php endforeach ?>
- </ul>
- <a href="<?php echo get_category_link($cat_id); ?>" class="view-blog">View the blog</a>
- </li>
- <?php
- }
- }
- ?>
- </ul>
- </div>
- <!-- end service sidebar -->
- <?php
- $images = get_post_images(get_the_ID());
- if (!empty($images)) {
- ?>
- <!-- service content -->
- <div id="service-content" class="right">
- <!-- project slideshow -->
- <div class="project-slideshow">
- <ul>
- <?php foreach ($images as $image): ?>
- <li><?php echo wp_get_attachment_image($image->ID, 'homepage_image'); ?></li>
- <?php endforeach ?>
- </ul>
- </div>
- <!-- end project slideshow -->
- <div class="dotted-divider"></div>
- <div class="project-slideshow-description">
- <?php foreach ($images as $image): ?>
- <div class="image-<?php echo $image->ID; ?>-description item-description">
- <h4><?php echo get_the_title($image->ID) ?></h4>
- <?php echo wpautop($image->post_excerpt); ?>
- </div>
- <?php endforeach ?>
- <div class="nav">
- </div>
- </div>
- <div class="projects-slider">
- <a href="#" class="control prev"></a>
- <div class="main">
- <ul>
- <?php $i = 0; foreach ($images as $image):
- $attachment_src = wp_get_attachment_image_src($image->ID, 'full'); ?>
- <li>
- <a href="#" rel="<?php echo $i; ?>">
- <img src="<?php echo rfd_get_timthumb($attachment_src[0], 62, 62, 1, 2); ?>" alt="" />
- <span class="hover"><img src="<?php echo rfd_get_timthumb($attachment_src[0], 62, 62, 1); ?>" alt="" /></span>
- </a>
- </li>
- <?php $i++; endforeach ?>
- </ul>
- </div>
- <a href="#" class="control next"></a>
- </div>
- </div>
- <!-- end service content -->
- <?php
- }
- ?>
- <?php
- }
- }
- get_footer();
- ?>
Add Comment
Please, Sign In to add comment