Advertisement
Guest User

Untitled

a guest
Jun 21st, 2013
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 5.00 KB | None | 0 0
  1. <?php
  2. if (have_posts()) : while (have_posts()) : the_post();
  3.         $count++;
  4.         $image_thumb = '';
  5.  
  6.         if (has_post_thumbnail(get_the_ID(), 'blog_ft')) {
  7.             $image_id = get_post_thumbnail_id(get_the_ID());
  8.             $image_thumb = wp_get_attachment_image_src($image_id, 'blog_ft', true);
  9.         }
  10.         ?>
  11.  
  12.  
  13.         <!-- Begin each blog post -->
  14.         <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  15.             <div class="post_wrapper" <?php if (empty($featured_posts_arr) && $count == 1 && is_home()) { ?>style="margin-top:15px;"<?php } ?>>
  16.  
  17.                 <div class="post_inner_wrapper" <?php if (empty($image_thumb)) { ?>style="margin-top:10px"<?php } ?>>
  18.  
  19.                     <?php
  20.                     if (!empty($image_thumb)) {
  21.                         ?>
  22.  
  23.                         <div class="one_half">
  24.                             <div class="post_img">
  25.                                 <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
  26.                                     <img src="<?php echo $image_thumb[0]; ?>" alt="" class="home_category_ft"/>
  27.                                 </a>
  28.                             </div>
  29.                         </div>
  30.  
  31.  
  32.                         <div class="post_header_wrapper">
  33.                             <div class="post_header">
  34.                                 <h3>
  35.                                     <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a>
  36.                                 </h3>
  37.                             </div>
  38.                         </div>
  39.  
  40.                         <div class="one_half last">
  41.                             <p>
  42.                                 <?php
  43.                                 echo pp_substr(strip_tags(strip_shortcodes(get_the_content())), 800);
  44.                                 ?>
  45.                             </p>
  46.                         </div>
  47.                         <?php if (function_exists('kc_add_social_share')) kc_add_social_share(); ?>
  48.  
  49.                         <div class="tag-container">
  50.                             <?php
  51.                             $posttags = get_the_tags();
  52.                             if ($posttags) {
  53.                                 echo "<span>TAGS: &nbsp;</span>";
  54.                                 $taglist = "";
  55.                                 foreach ($posttags as $tag) {
  56.                                     $taglist .= $tag->name . ', ';
  57.                                 }
  58.                                 echo "<label>" . rtrim($taglist, ", ") . "</label>";
  59.                             }
  60.                             ?>
  61.                         </div>
  62.  
  63.                         <?php
  64.                     }
  65.                     ?>
  66.  
  67.  
  68.                     <?php
  69.                     if (empty($image_thumb)) {
  70.                         ?>
  71.  
  72.                         <div class="post_header_wrapper">
  73.                             <div class="post_header">
  74.                                 <h3>
  75.                                     <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a>
  76.                                 </h3>
  77.                             </div>
  78.                         </div>
  79.  
  80.                         <div class="one_half last">
  81.                             <p>
  82.                                 <?php
  83.                                 echo pp_substr(strip_tags(strip_shortcodes(get_the_content())), 800);
  84.                                 ?>
  85.                             </p>
  86.                         </div>
  87.  
  88.                         <?php if (function_exists('kc_add_social_share')) kc_add_social_share(); ?>
  89.  
  90.                         <div class="tag-container">
  91.                             <?php
  92.                             $posttags = get_the_tags();
  93.                             if ($posttags) {
  94.                                 echo "<span>TAGS: &nbsp;</span>";
  95.                                 $taglist = "";
  96.                                 foreach ($posttags as $tag) {
  97.                                     $taglist .= $tag->name . ', ';
  98.                                 }
  99.                                 echo "<label>" . rtrim($taglist, ", ") . "</label>";
  100.                             }
  101.                             ?>
  102.                         </div>
  103.  
  104.                         <?php
  105.                     }
  106.                     ?>
  107.  
  108.                 </div>
  109.  
  110.             </div>
  111.         </div>
  112.         <br class="clear"/>
  113.         <!-- End each blog post -->
  114.  
  115.         <?php
  116.     endwhile;
  117. endif;
  118. ?>
  119.  
  120. <div class="pagination">
  121.     <?php
  122.     if (function_exists("wpapi_pagination")) {
  123.         wpapi_pagination($wp_query->max_num_pages);
  124.     }
  125.     ?>
  126. </div>
  127.  
  128.  
  129. <?php
  130. echo '<div class="foot-menu-con">';
  131. echo '<div class="foot-banner-span">
  132.    <span>SIMILAR STUFF</span>
  133. </div>';
  134. if (has_nav_menu('footer-menu')) {
  135.     // User has assigned menu to this location;
  136.     // output it
  137.     wp_nav_menu(array('theme_location' => 'footer-menu'));
  138. }
  139. echo '</div>';
  140. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement