works with wp single post dynamic on post format based
//use for single post dynamic on post format based
<?php while(have_posts()) : the_post(); ?>
<article class="post-single">
<div class="post-info">
<h2><a href="<?php the_permalink( ) ?>"><?php the_title( ); ?></a></h2>
<h6 class="upper"><span>By</span><a href="<?php the_permalink( ) ?>"><?php the_author(); ?></a><span class="dot"></span><span><?php the_time( 'F d, Y') ?></span><span class="dot"></span><a href="<?php the_permalink( ); ?>" class="post-tag"><?php the_tags( ); ?></a></h6>
</div>
<?php if(get_post_meta(get_the_ID(), 'video-post-link', true)) : ?>
<div class="post-media">
<div class="media-video">
<?php echo wp_oembed_get(get_post_meta(get_the_ID(), 'video-post-link', true)); ?>
</div>
</div>
<?php elseif(get_post_meta(get_the_ID(), 'audio-post-link', true)) : ?>
<div class="post-media">
<div class="media-audio">
<?php echo wp_oembed_get(get_post_meta(get_the_ID(), 'audio-post-link', true)); ?>
</div>
</div>
<?php elseif(get_post_meta(get_the_ID(), 'gallery-images', true)) : ?>
<div class="post-media">
<div data-options="{"animation": "slide", "controlNav": true" class="flexslider nav-outside">
<ul class="slides">
<?php
$gall = get_post_meta(get_the_ID(), 'gallery-images', true);
foreach ($gall as $gallllll) :
?>
<li><img src="<?php echo $gallllll ?>" alt="" ></li>
<?php endforeach; ?>
</ul>
</div>
</div>
<?php else : ?>
<div class="post-media"><?php the_post_thumbnail( ); ?></div>
<?php endif; ?>
<div class="post-body">
<?php the_content( ); ?>
</div>
</article>
<?php endwhile; ?>
.............................................
No comments