Posted By

lexpresso on 11/05/11


Tagged

textmate


Versions (?)

Pro


 / Published in: Other
 

  1. <h3>Posts For the Motion</h3>
  2.  
  3. <ul class="unstyled">
  4. <?php $tag = get_post_meta($post->ID, "arena_proposts_hashtag" , $single = true);
  5.  
  6. // query the posts of your custom post types
  7. $pro_posts_query = new WP_query(
  8. array(
  9. 'post_type' => array(
  10. 'video'
  11. ,'post'
  12. ,'picture'
  13. ,'candidate'
  14. ),
  15. 'tag' => $tag
  16. )
  17. );
  18. // have some posts?
  19. if ($pro_posts_query->have_posts()) :
  20. while ($pro_posts_query->have_posts()) : $pro_posts_query->the_post(); // begin the Loop ?>
  21.  
  22. <?php $post_type = $post->post_type; ?>
  23. <li>
  24. <a href="<?php the_permalink(); ?>" title="Link to <?php the_title(); ?>"><?php the_title(); ?></a>&nbsp;<span class="label"><?php echo $post->post_type; ?></span>
  25. <p><?php excerpt(15); ?></p>
  26. </li>
  27. <?php endwhile; endif; ?>
  28. </ul>
  29.  
  30. <h3>Posts Against the Motion</h3>
  31. <ul class="unstyled">
  32. <?php $tag2 = get_post_meta($post->ID, "arena_conposts_hashtag" , $single = true);
  33.  
  34. // query the posts of your custom post types
  35. $con_posts_query = new WP_query(
  36. array(
  37. 'post_type' => array(
  38. 'video'
  39. ,'post'
  40. ,'picture'
  41. ,'candidate'
  42. ),
  43. 'tag' => get_post_meta($post->ID, "arena_conposts_hashtag", $single = true)
  44. )
  45. );
  46.  
  47. if ($con_posts_query->have_posts()) :
  48. while ($con_posts_query->have_posts()) : $con_posts_query->the_post(); // begin the Loop ?>
  49.  
  50. <?php $post_type = $post->post_type; ?>
  51. <li>
  52. <a href="<?php the_permalink(); ?>" title="Link to <?php the_title(); ?>"><?php the_title(); ?></a>&nbsp;<span class="label"><?php echo $post->post_type; ?></span>
  53. <p><?php excerpt(15); ?></p>
  54. </li>
  55. <?php endwhile; endif; ?>
  56. </ul>

Report this snippet  

You need to login to post a comment.