Advertisement
Guest User

2 Columns

a guest
Mar 21st, 2013
257
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.58 KB | None | 0 0
  1. <?php get_header(); ?>
  2.  
  3. <div id="content">
  4.  
  5. <?php include (TEMPLATEPATH . '/slide.php'); ?>
  6.  
  7. <div class="high-box lbox"> <!-- #################  highlight category-1 #################### -->
  8. <?php $high_cat1 = get_option('repo_high_cat1'); ?>
  9.  
  10.  
  11. </h2>
  12. <?php $i = 1;?>
  13. <?php
  14. $high_cat1 = get_option('repo_high_cat1');
  15. $high_query = new WP_Query( 'category_name='.$high_cat1.'&posts_per_page=4' );
  16. while ( $high_query->have_posts() ) : $high_query->the_post();
  17. ?>
  18. <?php if($i == 1):?>
  19.  
  20. <div class="high-first-item">
  21. <img class="highmage" src="<?php bloginfo('stylesheet_directory'); ?>/timthumb.php?src=<?php get_image_url(); ?>&amp;h=100&amp;w=310&amp;zc=1" alt="" />
  22. <h3><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h3>
  23.     <?php wpe_excerpt('wpe_excerptlength_slide', 'wpe_excerptmore'); ?>
  24. </div>
  25.  
  26. <?php elseif($i > 1 ):?>
  27.  
  28. <div class="high-rest-item">
  29. <h3><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php echo short_title('...', 5); ?></a></h3>
  30. </div>
  31.  <?php endif; ?>
  32.  
  33.  <?php $i++; ?>
  34. <?php endwhile; ?>
  35.  
  36. </div>
  37.  
  38. <div class="high-box rbox"> <!-- #################  highlight category-2 #################### -->
  39. <?php $high_cat2 = get_option('repo_high_cat2'); ?>
  40. <?php $i = 1;?>
  41. <?php
  42. $high_cat2 = get_option('repo_high_cat2');
  43. $high_query = new WP_Query( 'category_name='.$high_cat2.'&posts_per_page=4' );
  44. while ( $high_query->have_posts() ) : $high_query->the_post();
  45. ?>
  46. <?php if($i == 1):?>
  47.  
  48. <div class="high-first-item">
  49. <img class="highmage" src="<?php bloginfo('stylesheet_directory'); ?>/timthumb.php?src=<?php get_image_url(); ?>&amp;h=100&amp;w=310&amp;zc=1" alt="" />
  50. <h3><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h3>
  51.     <?php wpe_excerpt('wpe_excerptlength_slide', 'wpe_excerptmore'); ?>
  52. </div>
  53.  
  54. <?php elseif($i > 1 ):?>
  55.  
  56. <div class="high-rest-item">
  57. <h3><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php echo short_title('...', 5); ?></a></h3>
  58. </div>
  59.  <?php endif; ?>
  60.  
  61.  <?php $i++; ?>
  62. <?php endwhile; ?>
  63.  
  64. </div>
  65.  
  66. <div class="clear"></div>
  67.  
  68. <?php if (have_posts()) : ?>
  69. <?php while (have_posts()) : the_post(); ?>
  70.  
  71. <div class="postleft" id="post-<?php the_ID(); ?>">
  72.  
  73. <div class="title">
  74.     <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
  75. </div>
  76. <div class="postmeta">
  77.     <span class="author">Posted by <?php the_author(); ?> </span> <span class="clock">  <?php the_time('M - j - Y'); ?></span> <span class="comm"><?php comments_popup_link('0 Comment', '1 Comment', '% Comments'); ?></span>
  78. </div>
  79.  
  80. <div class="entry">
  81.  
  82. <?php
  83. if ( has_post_thumbnail() ) { ?>
  84.     <a href="<?php the_permalink() ?>"><img class="postimg" src="<?php bloginfo('stylesheet_directory'); ?>/timthumb.php?src=<?php get_image_url(); ?>&amp;h=150&amp;w=200&amp;zc=1" alt=""/></a>
  85. <?php } else { ?>
  86.     <a href="<?php the_permalink() ?>"><img class="postimg" src="<?php bloginfo('template_directory'); ?>/images/dummy.png" alt="" /></a>
  87. <?php } ?>
  88.  
  89. <?php wpe_excerpt('wpe_excerptlength_index', ''); ?>
  90.  
  91. <div class="clear">
  92.  
  93. </div>
  94.  
  95. </div>
  96.  
  97. </div>
  98.  
  99. <div class="postright" id="post-<?php the_ID(); ?>">
  100.  
  101. <div class="title">
  102.     <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
  103. </div>
  104. <div class="postmeta">
  105.     <span class="author">Posted by <?php the_author(); ?> </span> <span class="clock">  <?php the_time('M - j - Y'); ?></span> <span class="comm"><?php comments_popup_link('0 Comment', '1 Comment', '% Comments'); ?></span>
  106. </div>
  107.  
  108. <div class="entry">
  109.  
  110. <?php
  111. if ( has_post_thumbnail() ) { ?>
  112.     <a href="<?php the_permalink() ?>"><img class="postimg" src="<?php bloginfo('stylesheet_directory'); ?>/timthumb.php?src=<?php get_image_url(); ?>&amp;h=150&amp;w=200&amp;zc=1" alt=""/></a>
  113. <?php } else { ?>
  114.     <a href="<?php the_permalink() ?>"><img class="postimg" src="<?php bloginfo('template_directory'); ?>/images/dummy.png" alt="" /></a>
  115. <?php } ?>
  116.  
  117. <?php wpe_excerpt('wpe_excerptlength_index', ''); ?>
  118.  
  119. <div class="clear">
  120.  
  121. </div>
  122.  
  123. </div>
  124.  
  125. </div>
  126.  
  127. <?php endwhile; ?>
  128.  
  129. <div class="clear"></div>
  130.  
  131. <?php getpagenavi(); ?>
  132.  
  133. <?php else : ?>
  134.         <h1 class="title">Not Found</h1>
  135.         <p>Sorry, but you are looking for something that isn't here.</p>
  136. <?php endif; ?>
  137.       <?php wp_reset_query(); ?>
  138. </div>
  139.  
  140. <?php get_sidebar(); ?>
  141.  
  142. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement