Advertisement
Guest User

Untitled

a guest
Dec 20th, 2014
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.95 KB | None | 0 0
  1.             <ol>
  2. <?php
  3. $postcount=0;
  4. $my_query = new WP_Query('category_name=news&showposts=2');
  5. while ($my_query->have_posts()) : $my_query->the_post();
  6. $do_not_duplicate = $post->ID;
  7. global $post;        
  8. if( ($postcount % 2) == 0 ) $post_class = 'categoryinsideleft'; else $post_class = 'categoryinsideright'; ?>
  9.                
  10.                
  11.                 <li class="<?php echo $post_class; ?>">
  12. <a class="link" href="">
  13. <div class="mg-image">
  14. <img width="163.483" height="163" src="http://guestlist.gr/site/wp-content/uploads/2014/12/tumblr_static_f1f79qg95v4swokwss4c4g0gs_640_v2.jpg" alt="<?php the_title(); ?>" class="img-zoom">
  15. </div>
  16. </br></br>
  17. <span class="wrap">
  18. <span class="arrows4444"></span>
  19. <span class="text">
  20. <span class="category">Style | Grooming</span>
  21. </br>
  22. <span class="headline"><?php the_title(); ?></span>
  23. </span>
  24. </span>
  25. </a>
  26. </li>
  27.  
  28.  
  29.         <?php $postcount++;
  30.             endwhile; ?>
  31.            
  32.  
  33. </ol>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement