Guest User

multipleloop

a guest
Oct 11th, 2014
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.65 KB | None | 0 0
  1. <div id="newsblock">
  2.    
  3.  
  4. <h4 class="widget-header"><ul class="header-widget-title"><?php echo $title; ?></ul></h4>
  5.  
  6.  
  7.         <div class="newsblock-left">
  8.  
  9.             <ul class="home-links2">
  10.                         <?php $recent = new WP_Query(array( 'cat' => $categories, 'showposts' => 1 )); while($recent->have_posts()) : $recent->the_post();?>
  11.                         <li>
  12.                             <?php if (  (function_exists('has_post_thumbnail')) && (has_post_thumbnail())  ) { ?>
  13.                            
  14.                                 <a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_post_thumbnail( 'large-thumb', array( 'class' => 'img-large' )); ?></a>
  15.                            
  16.                             <?php } ?>
  17.                             <div class="home-links2-text">
  18.                                
  19.                                
  20.                             </div><!--home-links2-text-->
  21.                         </li>
  22.                         <?php endwhile; ?>
  23.                     </ul>
  24.                
  25. <div class="newsblock-left-inner">
  26.    
  27.                 <h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
  28.                
  29.                 <p><?php echo excerpt(53); ?></p>
  30.                
  31.         </div><!--newsblock-left-inner-->
  32.  
  33.            
  34.                
  35.          </div><!--newsblock-left-->
  36.  
  37.        <div class="newsblock-right">
  38.  
  39.         <ul class="home-links2">
  40.  
  41.                         <?php $recent = new WP_Query(array( 'cat' => $categories, 'showposts' => 3 , 'offset'  => 1 )); while($recent->have_posts()) : $recent->the_post();?>
  42.                         <li>
  43.                             <?php if (  (function_exists('has_post_thumbnail')) && (has_post_thumbnail())  ) { ?>
  44.                            
  45.                                 <a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_post_thumbnail('medium-thumb'); ?></a>
  46.                            
  47.                             <?php } ?>
  48.                             <div class="home-links2-text">
  49.                                 <a href="<?php the_permalink(); ?>"><?php short_title(68); ?></a>
  50.                                
  51.                             </div><!--home-links2-text-->
  52.                         </li>
  53.                         <?php endwhile; ?>
  54.                     </ul>
  55.  
  56.              
  57.            
  58.     <ul class="home-links2">
  59.        
  60.        
  61.  
  62.        </div><!--newsblock-right-->
  63.  
  64.         <div class="newsblock-right2">
  65.  
  66.            
  67.       <ul class="home-links2">
  68.  
  69.                         <?php $recent = new WP_Query(array( 'cat' => $categories, 'showposts' => 4 , 'offset'  => 4 )); while($recent->have_posts()) : $recent->the_post();?>
  70.                         <li>
  71.                             <?php if (  (function_exists('has_post_thumbnail')) && (has_post_thumbnail())  ) { ?>
  72.                            
  73.                                 <a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"></a>
  74.                            
  75.                             <?php } ?>
  76.                             <div class="home-links2-text">
  77.                                 <a href="<?php the_permalink(); ?>"><?php short_title(68); ?></a>
  78.                                
  79.                             </div><!--home-links2-text-->
  80.                         </li>
  81.                         <?php endwhile; ?>
  82.                     </ul>
  83.  
  84.              
  85.            
  86.     <ul class="home-links2">
  87.        
  88.            
  89.        
  90.                    
  91.                </div>
  92.  
  93.                
  94.         </div>  <!--newsblock-right2-->
  95.  
  96.      </div>  <!--newsblock-->
Advertisement
Add Comment
Please, Sign In to add comment