<?php get_header();
$post_name = get_query_var(‘pagename’);
switch ($post_name) {
case ‘press-coverage’:
$wp_type = ‘nooz_coverage’;
$page_title = ‘Company News’;
break;
case ‘press-releases’:
$wp_type = ‘nooz_release’;
$page_title = ‘Press Releases’;
break;
}
?>
<div id=”content” class=”site-content” role=”main”>
<h1><?php echo $page_title; ?></h1>
<table>
<?php
$query = new WP_Query( array( ‘post_type’ => $wp_type, ‘posts_per_page’ => 200 ) );
if ( $query->have_posts() ) :
while ( $query->have_posts() ) : $query->the_post();
$post_id = get_the_ID();
$nooz_meta = get_metadata(‘post’,$post_id,’_nooz’);
$wp_type = get_post_type( get_the_ID() );
?>
<?php
if ($wp_type == ‘nooz_coverage’):
?>
<tr class=”post news”>
<td class=”text-center” width=”140″>
” target=”_blank” title=”<?php the_title_attribute(); ?>”> .png” alt=”<?php echo strtolower(str_replace(” “, “-“, $nooz_meta[0][‘source’])); ?>.png” width=”120″/>
</td>
<td>
<h3>” target=”_blank” title=”<?php the_title_attribute(); ?>”><?php the_title(); ?></h3>
<p class=”date”><?php the_time(‘Y-m-d’); ?></p>
<div class=”excerpt”><?php the_excerpt(); ?></div>
<!– Source:<?php echo $nooz_meta[0][‘source’]; ?> –>
</td>
</tr>
<?php
else:
?>
<tr class=”post”>
<td class=”date”>
<?php the_time(‘Y-m-d’); ?>
</td>
<td>
” rel=”bookmark” title=”<?php the_title_attribute(); ?>”><?php the_title(); ?>
</td>
</tr>
<?php
endif;
?>
<?php
endwhile;
wp_reset_postdata();
endif;
?>
</table>
</div>
<?php get_footer(); ?>`