Guest User

Untitled

a guest
Sep 14th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.92 KB | None | 0 0
  1. <?php
  2. /* Template Name: Category Listing */
  3. get_header();
  4. if (have_posts()) {
  5. while (have_posts()) {
  6. the_post();
  7. ?>
  8. <!-- service sidebar -->
  9. <div id="service-sidebar" class="left">
  10. <ul class="widgets">
  11. <li class="widget widget_our_work">
  12. <div class="title">
  13.  
  14. <?php if(is_page( 'Branding' )){?><span class="label">B</span><?php } ?>
  15. <?php if(is_page( 'Print' )){?><span class="label">P</span><?php } ?>
  16. <?php if(is_page( 'packing' )){?><span class="label">P</span><?php } ?>
  17. <?php if(is_page( 'Odds & Ends' )){?><span class="label">O</span><?php } ?>
  18.  
  19. <p class="tk-kulturista-web"><span>our work</span>: <?php the_title(); ?></p>
  20. </div>
  21. <?php the_content(); ?>
  22. </li>
  23. <?php global $post ?>
  24. <?php query_posts('meta_key=listing_category&meta_value=Print'); ?>
  25. <?php if (have_posts()) { ?>
  26. <?php while (have_posts()) { the_post(); ?>
  27. <li class="widget widget_recent_posts widget_last">
  28. <h3 class="widgettitle tk-kulturista-web">From the blog</h3>
  29. <ul>
  30. <?php foreach ($cat_posts as $i => $cpost): ?>
  31. <li>
  32. <?php if (has_post_thumbnail($cpost->ID)): ?>
  33. <a href="<?php echo get_permalink($cpost->ID); ?>" class="thumb">
  34. <?php echo get_the_post_thumbnail($cpost->ID, 'post_icon'); ?>
  35. </a>
  36. <?php endif ?>
  37. <div class="entry">
  38. <span class="date"><?php echo get_the_time('D, j F Y', $cpost->ID); ?></span>
  39. <h4><a href="<?php echo get_permalink($cpost->ID); ?>"><?php echo get_the_title($cpost->ID); ?></a></h4>
  40. <?php echo apply_filters('the_content', shortalize($cpost->post_content, 8)); ?>
  41. </div>
  42. <div class="cl">&nbsp;</div>
  43. </li>
  44. <?php if ($i+1 < count($cat_posts)): ?>
  45. <li class="divider"></li>
  46. <?php endif ?>
  47. <?php endforeach ?>
  48. </ul>
  49. <a href="<?php echo get_category_link($cat_id); ?>" class="view-blog">View the blog</a>
  50. </li>
  51. <?php
  52. }
  53. }
  54. ?>
  55. </ul>
  56. </div>
  57. <!-- end service sidebar -->
  58.  
  59. <?php
  60. $images = get_post_images(get_the_ID());
  61. if (!empty($images)) {
  62. ?>
  63. <!-- service content -->
  64. <div id="service-content" class="right">
  65.  
  66. <!-- project slideshow -->
  67. <div class="project-slideshow">
  68. <ul>
  69. <?php foreach ($images as $image): ?>
  70. <li><?php echo wp_get_attachment_image($image->ID, 'homepage_image'); ?></li>
  71. <?php endforeach ?>
  72. </ul>
  73. </div>
  74. <!-- end project slideshow -->
  75.  
  76. <div class="dotted-divider"></div>
  77.  
  78. <div class="project-slideshow-description">
  79. <?php foreach ($images as $image): ?>
  80. <div class="image-<?php echo $image->ID; ?>-description item-description">
  81. <h4><?php echo get_the_title($image->ID) ?></h4>
  82. <?php echo wpautop($image->post_excerpt); ?>
  83. </div>
  84. <?php endforeach ?>
  85. <div class="nav">
  86.  
  87. </div>
  88. </div>
  89.  
  90. <div class="projects-slider">
  91. <a href="#" class="control prev"></a>
  92. <div class="main">
  93. <ul>
  94. <?php $i = 0; foreach ($images as $image):
  95. $attachment_src = wp_get_attachment_image_src($image->ID, 'full'); ?>
  96. <li>
  97. <a href="#" rel="<?php echo $i; ?>">
  98. <img src="<?php echo rfd_get_timthumb($attachment_src[0], 62, 62, 1, 2); ?>" alt="" />
  99. <span class="hover"><img src="<?php echo rfd_get_timthumb($attachment_src[0], 62, 62, 1); ?>" alt="" /></span>
  100. </a>
  101. </li>
  102. <?php $i++; endforeach ?>
  103. </ul>
  104. </div>
  105. <a href="#" class="control next"></a>
  106. </div>
  107.  
  108. </div>
  109. <!-- end service content -->
  110. <?php
  111. }
  112. ?>
  113. <?php
  114. }
  115. }
  116.  
  117. get_footer();
  118. ?>
Add Comment
Please, Sign In to add comment