Advertisement
Guest User

Untitled

a guest
Feb 8th, 2012
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.89 KB | None | 0 0
  1. <?php
  2. /**
  3. * The main template file for display category page.
  4. *
  5. * @package WordPress
  6. * @subpackage Pim
  7. */
  8.  
  9. get_header();
  10.  
  11. ?>
  12.  
  13. <!-- Begin content -->
  14. <div id="content_wrapper">
  15.  
  16. <?php
  17. // If is category or subcategory of $cat_id
  18. if (!function_exists('is_category_or_sub')) {
  19. function is_category_or_sub($cat_id = 0) {
  20. foreach (get_the_category() as $cat) {
  21. if ($cat_id == $cat->cat_ID || cat_is_ancestor_of($cat_id, $cat)) return true;
  22. }
  23. return false;
  24. }
  25. }
  26. ?>
  27. <?php if (is_category_or_sub(4)) : ?>
  28.  
  29. <?php load_template(TEMPLATEPATH . '/cat_videopagine.php'); ?>
  30.  
  31. <?php else : ?>
  32.  
  33. <div class="inner">
  34.  
  35. <!-- Begin main content -->
  36. <div class="two_third large">
  37.  
  38. <div class="sidebar_content">
  39.  
  40. <?php peerapong_breadcrumbs(); ?><br/>
  41.  
  42. <?php
  43.  
  44. if (have_posts()) : while (have_posts()) : the_post();
  45.  
  46. ?>
  47.  
  48.  
  49. <!-- Begin each blog post -->
  50. <div class="post_wrapper">
  51. <div class="post_header">
  52. <div style="float:left; width:85%">
  53. <h2 class="cufon">
  54. <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
  55. <?php the_title(); ?>
  56. </a>
  57. </div> </h2>
  58.  
  59. <div class="date_post">
  60. <?php
  61. $x = get_custom_field('datapub');
  62. $time = strtotime($x);
  63. print date('d', $time);
  64. ?>
  65. <div style="border-top:1px solid #000;"><?php print date('M', $time); ?></div>
  66.  
  67. </div>
  68. </div>
  69. <br class="clear"/>
  70.  
  71. <div class="post_img">
  72. <?php
  73. if( get_post_meta(get_the_ID(), 'blog_thumb_image_url', true) ) :
  74. $image_thumb = get_post_meta(get_the_ID(), 'blog_thumb_image_url', true);
  75. ?>
  76. <img class="alignleft" src="<?php echo get_bloginfo( 'stylesheet_directory' ); ?>/timthumb.php?src=<?php echo $image_thumb; ?>&amp;h=149&amp;w=220&amp;zc=1" alt="" />
  77.  
  78. <?php endif;?>
  79.  
  80. <?php
  81. print_custom_field('videopreview:wrapper'
  82. , '<iframe class="alignleft" width="220" height="179" src="[+content+]" frameborder="0" allowfullscreen></iframe>'
  83. , '<em></em>');
  84. ?>
  85.  
  86. <?php new_excerpt(300); ?>
  87. </div>
  88. <br class="clear"/>
  89. </div>
  90. <!-- End each blog post -->
  91.  
  92. <?php endwhile; endif; ?>
  93.  
  94. <div class="pagination"><p><?php posts_nav_link(' '); ?></p></div>
  95.  
  96. </div>
  97.  
  98. </div>
  99.  
  100. <div class="one_fourth home last">
  101. <div class="sidebar">
  102.  
  103. <div class="content">
  104.  
  105. <ul class="sidebar_widget">
  106. <?php dynamic_sidebar('Rubriche Sidebar'); ?>
  107. </ul>
  108.  
  109. </div>
  110.  
  111. </div>
  112. </div>
  113. </div>
  114. <!-- End main content -->
  115. <?php endif; ?>
  116. </div>
  117.  
  118. <br class="clear"/>
  119.  
  120. <!-- End content -->
  121.  
  122.  
  123. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement