Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php get_header(); ?>
- <div id="content">
- <?php get_sidebar(); ?>
- <div id="left-content">
- <div class="topstory">
- <?php $args = array(
- 'post_type' => array('news','post'),
- 'posts_per_page' => 1,
- 'post__in' =>get_option( 'sticky_posts' ),
- 'tax_query' => array(
- array(
- 'taxonomy' => 'posttype',
- 'terms' => 7,
- 'field' => 'id',
- 'operator' => 'NOT IN',
- )
- )
- );
- query_posts( $args );
- ?>
- <?php if( $wp_query->post_count >=2 ) : ?>
- <div class="topcolumn">
- <?php else : ?>
- <div class="toppost">
- <?php endif; ?>
- <?php while (have_posts()) : the_post(); ?>
- <?php $displayed = $post->ID;?>
- <?php $value = get_post_meta($post->ID, 'type', true) ?>
- <?php if($value == 'bigstory') { ?>
- <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
- big story - <?php the_title();?>
- </div>
- <?php } elseif($value == 'breakingnews') { ?>
- breaking news - <?php the_title();?><br />
- <?php } elseif($value == 'group') { ?>
- <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
- <?php
- $attachments = get_children( array('post_parent' => get_the_ID(), 'post_type' => 'attachment', 'post_mime_type' =>'image') );
- foreach ( $attachments as $attachment_id => $attachment ) {
- echo wp_get_attachment_image( $attachment_id, 'Front Group' );
- } ?>
- <span class="title"><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></span>
- <?php the_excerpt(); ?>
- <?php if ( get_post_meta($post->ID, 'grouping', 'on') ) { ?>
- <ul class="group-items">
- <?php
- $taxonomies = get_post_meta($post->ID, 'groupid', true);
- $myq = new WP_Query('groupitems='.$taxonomies);
- if ($myq->have_posts()) : while ($myq->have_posts()) : $myq->the_post(); // the loop ?>
- <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>
- <?php endwhile; else:?>
- </ul>
- <?php endif;?>
- <?php }?>
- </div>
- <?php } else { ?>
- <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
- normal - <?php the_title();?>
- </div>
- <?php } ?>
- <?php?>
- <?php endwhile; ?>
- </div>
- </div>
- </div>
- </div>
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement