Advertisement
Guest User

Untitled

a guest
Sep 11th, 2011
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.30 KB | None | 0 0
  1. <?php get_header(); ?>
  2.  
  3. <div id="content">
  4. <?php get_sidebar(); ?>
  5.  
  6. <div id="left-content">
  7. <div class="topstory">
  8. <?php $args = array(
  9. 'post_type' => array('news','post'),
  10. 'posts_per_page' => 1,
  11. 'post__in' =>get_option( 'sticky_posts' ),
  12. 'tax_query' => array(
  13. array(
  14. 'taxonomy' => 'posttype',
  15. 'terms' => 7,
  16. 'field' => 'id',
  17. 'operator' => 'NOT IN',
  18. )
  19. )
  20. );
  21. query_posts( $args );
  22. ?>
  23. <?php if( $wp_query->post_count >=2 ) : ?>
  24. <div class="topcolumn">
  25. <?php else : ?>
  26. <div class="toppost">
  27. <?php endif; ?>
  28. <?php while (have_posts()) : the_post(); ?>
  29. <?php $displayed = $post->ID;?>
  30.  
  31. <?php $value = get_post_meta($post->ID, 'type', true) ?>
  32. <?php if($value == 'bigstory') { ?>
  33. <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  34. big story - <?php the_title();?>
  35. </div>
  36. <?php } elseif($value == 'breakingnews') { ?>
  37. breaking news - <?php the_title();?><br />
  38. <?php } elseif($value == 'group') { ?>
  39. <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  40. <?php
  41. $attachments = get_children( array('post_parent' => get_the_ID(), 'post_type' => 'attachment', 'post_mime_type' =>'image') );
  42. foreach ( $attachments as $attachment_id => $attachment ) {
  43. echo wp_get_attachment_image( $attachment_id, 'Front Group' );
  44. } ?>
  45. <span class="title"><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></span>
  46. <?php the_excerpt(); ?>
  47. <?php if ( get_post_meta($post->ID, 'grouping', 'on') ) { ?>
  48. <ul class="group-items">
  49. <?php
  50. $taxonomies = get_post_meta($post->ID, 'groupid', true);
  51. $myq = new WP_Query('groupitems='.$taxonomies);
  52. if ($myq->have_posts()) : while ($myq->have_posts()) : $myq->the_post(); // the loop ?>
  53. <li><span class="source"><?php echo( get_post_meta($post->ID, 'live', true) ) ?></span> <a href="<?php echo( get_post_meta($post->ID, 'syndication_permalink', true) ) ?>"><?php the_title(); ?></a> <span class="source2"><?php echo( get_post_meta($post->ID, 'syndication_source', true) ) ?></span></li>
  54. <?php endwhile; else:?>
  55. </ul>
  56. <?php endif;?>
  57. <?php }?>
  58. </div>
  59. <?php } else { ?>
  60. <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  61. normal - <?php the_title();?>
  62. </div>
  63. <?php } ?>
  64. <?php?>
  65.  
  66. <?php endwhile; ?>
  67. </div>
  68. </div>
  69. </div>
  70. </div>
  71.  
  72. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement