Advertisement
Guest User

Untitled

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