Advertisement
Guest User

Untitled

a guest
Jul 9th, 2014
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. <div id="parent-left">
  2. <div id="watch-share-title-box">
  3. <p class="header">WATCH <br/><span style="font-size: 18px;">AND SHARE</span></p>
  4. </div>
  5. <div id="watch-share">
  6. <?php
  7. $args = array (
  8. 'cat' => '4',
  9. 'posts_per_page' => '2',
  10. );
  11.  
  12. $the_posts = new WP_Query($args);
  13. if($the_posts->have_posts()) {
  14. while($the_posts->have_posts()){
  15. $the_posts->the_post();
  16. $id = get_the_ID();
  17. ?>
  18. <div id="posts">
  19. <?php
  20. if ( has_post_thumbnail() )
  21. the_post_thumbnail($id, 'thumbnail');
  22. ?>
  23. <strong><?php the_title_attribute(); ?> </strong>
  24.  
  25. </div>
  26. <?php
  27. }?>
  28. <div class="alignleft"><?php next_post_link('%link &raquo;') ?></div>
  29. <div class="alignright"><?php previous_post_link('&laquo; %link') ?></div>
  30. <?php
  31. }
  32. wp_reset_postdata();
  33.  
  34. ?>
  35. </div>
  36. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement