I am using Video post format and Standard post format.
add_theme_support('post-formats', array('video'));
While displaying all the blog posts, I want to show different icons for video post format and standard post format.
$query = array(
'post_type' => 'post',
'posts_per_page' => 12,
'tax_query' => $cat_query_var,
'paged' => $paged,
'meta_query' => $cat_query_vars
);
$wedding_qry = new WP_Query($query);
if ($wedding_qry->have_posts()) :
while ($wedding_qry->have_posts()) : $wedding_qry->the_post();
$post_format = get_post_format();
?>
<div class="col-md-4">
<div class="content">
<a href="<?php the_permalink(); ?>">
<div class="icon">
<?php if ($post_format = 'video') { ?>
<img src="<?php echo get_bloginfo("template_url") . '/img/video.png'; ?>" alt="video">
<?php } elseif (!empty($icon_image)) { ?>
<img src="<?php echo $icon_image["url"]; ?>" alt="<?php echo get_image_alt(get_the_ID()); ?>">
<?php } else { ?>
<img src="<?php echo get_bloginfo("template_url") . '/img/ring.png'; ?>" class="ringimg">
<?php } ?>
</div>
</a>
</div>
</div>
<?php $count++;
endwhile;
But $post_format always returns video. What am i doing wrong.
Please help.