Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div id="sidebar">
- <?php global $post;
- if( is_home() ):
- $tacs = "797,799";
- else:
- $tac_ids = get_post_meta( $post->ID, "tacticals", true );
- $post_bup = $post;
- $tacs = "";
- foreach( $tac_ids as $id => $on )
- $tacs .= $id.",";
- endif;
- $tacticals = get_posts("post_type=tactical-panel&orderby=rand&numberposts=2&include=".$tacs);
- foreach ( $tacticals as $post ):
- setup_postdata($post);
- get_template_part( 'tactical', get_post_format() );
- endforeach;
- $post = $post_bup;
- ?>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement