/ Published in: Other
Expand |
Embed | Plain Text
<h3>Posts For the Motion</h3> <ul class="unstyled"> <?php $tag = get_post_meta($post->ID, "arena_proposts_hashtag" , $single = true); // query the posts of your custom post types $pro_posts_query = new WP_query( array( 'post_type' => array( 'video' ,'post' ,'picture' ,'candidate' ), 'tag' => $tag ) ); // have some posts? if ($pro_posts_query->have_posts()) : while ($pro_posts_query->have_posts()) : $pro_posts_query->the_post(); // begin the Loop ?> <?php $post_type = $post->post_type; ?> <li> <a href="<?php the_permalink(); ?>" title="Link to <?php the_title(); ?>"><?php the_title(); ?></a> <span class="label"><?php echo $post->post_type; ?></span> <p><?php excerpt(15); ?></p> </li> <?php endwhile; endif; ?> </ul> <h3>Posts Against the Motion</h3> <ul class="unstyled"> <?php $tag2 = get_post_meta($post->ID, "arena_conposts_hashtag" , $single = true); // query the posts of your custom post types $con_posts_query = new WP_query( array( 'post_type' => array( 'video' ,'post' ,'picture' ,'candidate' ), 'tag' => get_post_meta($post->ID, "arena_conposts_hashtag", $single = true) ) ); if ($con_posts_query->have_posts()) : while ($con_posts_query->have_posts()) : $con_posts_query->the_post(); // begin the Loop ?> <?php $post_type = $post->post_type; ?> <li> <a href="<?php the_permalink(); ?>" title="Link to <?php the_title(); ?>"><?php the_title(); ?></a> <span class="label"><?php echo $post->post_type; ?></span> <p><?php excerpt(15); ?></p> </li> <?php endwhile; endif; ?> </ul>
You need to login to post a comment.
