Commit 1c406ea4 by Manzar Hussain

add single-media_coverage.php

parent 2782cacf
<?php get_header(); ?>
<div id="full-content" class="">
<section style="background: url('<?php echo home_url(); ?>/wp-content/uploads/2018/11/media-coverage-banner-bg.jpg')no-repeat center/cover;" class="media-banner-bg">
<div class="container">
<h1 class="page-title-cus">
<?php if(get_field('media_coverage_type')=='tv'){?>
Television
<?php } else if(get_field('media_coverage_type')=='online_interview'){?>
Print and Online
<?php } ?>
</h1>
<p>
</p>
</div>
</section>
<div class="container posRelative">
<div class="row blog-details">
<div class="col-md-8 col-12">
<div class="single-blog-content">
<div class="page-title-custom">
<h1 class="page-title-cus"><?php the_title(); ?></h1>
</div>
<article class="single-blog-content pg-single-default">
<?php if(have_posts()) : while(have_posts()) : the_post(); ?>
<?php the_content(); ?>
<?php endwhile; ?>
<?php endif; ?>
</article>
</div>
</div>
<div class="col-md-4 col-12">
<div class="sidebar-box posts-box">
<h5>Recent in
<?php if(get_field('media_coverage_type')=='tv'){?>
Television
<?php } else if(get_field('media_coverage_type')=='online_interview'){?>
Print and Online
<?php } ?>
</h5>
<div class="sidbar-posts newsletter-items">
<?php
$meta_name = get_field('media_coverage_type');
$args = array(
'post_type' => 'media_coverage',
'posts_per_page' =>5,
'paged' => $paged,
'orderby' => 'id',
'order' => 'DESC',
'meta_query' => array(
'relation' => 'AND',
array(
'key' => 'media_coverage_type',
'value' => $meta_name,
'compare' => '='
)
)
);
$loop = new WP_Query($args);
while ($loop->have_posts()) : $loop->the_post();
$link = '';
if((get_field('article_publish')=='External') || (get_field('article_publish')=='')) {
$link = get_field('article_url');
} else if((get_field('article_publish')=='Internal')) {
$link = get_permalink();
}
?>
<div class="row post-item no-gutters">
<div class="col-12">
<div class="post-info">
<p class="published"><span class="month"><?php the_time('M Y'); ?></span>&nbsp;&nbsp;&nbsp; Published on <span class="publish-date"><?php the_time('d M, Y'); ?></span></p>
<h3><a href="<?php echo get_field('article_url'); ?>"> <?php echo wp_trim_words( get_the_title(), 20 ); ?> </a></h5>
</div>
</div>
</div>
<?php endwhile; ?>
</div>
</div>
</div>
</div>
</div>
</div>
<?php get_footer(); ?>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment