Advertisement
Guest User

Untitled

a guest
Sep 28th, 2011
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.67 KB | None | 0 0
  1. <div class="box">
  2.   <?php
  3.         include(TEMPLATEPATH . '/includes/version.php');
  4.  
  5.         $the_query = new WP_Query('cat=-8,-9,-'. $ex_feat . ',-' . $ex_vid . '&showposts=' . $showposts . '&orderby=post_date&order=desc');
  6.  
  7.         $counter = 0; $counter2 = 0;
  8.  
  9.         while ($the_query->have_posts()) : $the_query->the_post(); $do_not_duplicate = $post->ID;
  10.     ?>
  11.   <?php $counter++; $counter2++; ?>
  12.   <div class="post <?php if ($counter == 1) { echo 'fl'; } else { echo 'fr'; $counter = 0; } ?>">
  13.     <h3 class="posted">+
  14.       <?php the_category(', ') ?>
  15.     </h3>
  16.     <?php if ( get_post_meta($post->ID, 'thumb', true) ) { ?>
  17.     <!-- DISPLAYS THE IMAGE URL SPECIFIED IN THE CUSTOM FIELD -->
  18.     <img src="<?php echo get_post_meta($post->ID, "thumb", $single = true); ?>" alt="" />
  19.     <?php } else { ?>
  20.     <!-- DISPLAY THE DEFAULT IMAGE, IF CUSTOM FIELD HAS NOT BEEN COMPLETED -->
  21.     <!--<img src="<?php //bloginfo('template_directory'); ?>/images/no-img-thumb.jpg" alt="" />-->
  22.     <?php } ?>
  23.     <h2><a>" href="<?php the_permalink() ?>" rel="bookmark">
  24.      <?php the_title(); ?>
  25.       </a></h2>
  26.     <p><?php echo strip_tags(get_the_excerpt(), '<a><strong>'); ?></p>
  27.     <p><span class="continue"><a>" href="<?php the_permalink() ?>">Continue...</a></span> | <span class="comments">
  28.       <?php comments_popup_link('Depoimentos (0)', 'Depoimentos (1)', 'Depoimentos (%)'); ?>
  29.       </span></p>
  30.   </div>
  31.   <!--/post-->
  32.   <?php if ( !($counter2 == $showposts) && ($counter == 0) ) { echo '<div class="hl-full"></div>'; ?>
  33.   <?php } ?>
  34.   <?php endwhile;
  35.  
  36.   wp_reset_query();
  37.  
  38.   ?>
  39. </div>
  40. <!--/box-->
  41. <div id="topbanner">
  42.   <?php
  43.  
  44.                 // Get banner code //
  45.                 $banner_img = get_option('premiumnews_banner_image');
  46.                 $banner_url = get_option('premiumnews_banner_url');
  47.  
  48.             ?>
  49.   <a> href="<?php echo "$banner_url"; ?>"><img src="<?php echo "$banner_img"; ?>" alt="" /></a> </div>
  50. <div class="boxes">
  51.   <h3 class="posted"> VEJA TAMBEM</h3>
  52.  
  53.   <?php
  54. // enter the IDs of the categories to display
  55. $display_categories = array(3,6);
  56. foreach ($display_categories as $category):
  57. setup_postdata($post); { ?>
  58.   <div class="col4">
  59.     <?php query_posts("showposts=1&include=$category");?>
  60.     <?php if ( get_post_meta($post->ID, 'thumb-h', true) ) { ?>
  61.     <!-- DISPLAYS THE IMAGE URL SPECIFIED IN THE CUSTOM FIELD -->
  62.     <img src="<?php echo get_post_meta($post->ID, "thumb-h", $single = true); ?>" alt="" />
  63.     <?php } ?>
  64.     <h2><a>" href="<?php the_permalink() ?>" rel="bookmark">
  65.       <?php the_title(); ?>
  66.       </a></h2>
  67.     <p><?php echo strip_tags(get_the_excerpt(), '<a><strong>'); ?></p>
  68.     <p><span class="continue"><a>" href="<?php the_permalink() ?>">Continue...</a></span> | <span class="comments">
  69.       <?php comments_popup_link('Depoimentos (0)', 'Depoimentos (1)', 'Depoimentos (%)'); ?>
  70.       </span></p>
  71.   </div>
  72.   <?php }
  73. endforeach;
  74.  wp_reset_query(); ?>
  75.   <!-- LAST CATEGORY LISTING - NEEDED TO END CSS COLUMNS -->
  76.   <div class="col5">
  77.     <?php query_posts("showposts=1&include=35"); ?>
  78.     <?php if ( get_post_meta($post->ID, 'thumb-h', true) ) { ?>
  79.     <!-- DISPLAYS THE IMAGE URL SPECIFIED IN THE CUSTOM FIELD -->
  80.     <img src="<?php echo get_post_meta($post->ID, "thumb-h", $single = true); ?>" alt="" />
  81.     <?php } ?>
  82.     <h2><a>" href="<?php the_permalink() ?>" rel="bookmark">
  83.       <?php the_title(); ?>
  84.       </a></h2>
  85.     <p><?php echo strip_tags(get_the_excerpt(), '<a><strong>'); ?></p>
  86.     <p><span class="continue"><a>" href="<?php the_permalink() ?>">Continue...</a></span> | <span class="comments">
  87.       <?php comments_popup_link('Depoimentos (0)', 'Depoimentos (1)', 'Depoimentos (%)'); ?>
  88.       </span></p>
  89.   </div>
  90.   <hr>
  91.   </hr>
  92. </div>
  93.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement