I'm trying to figure out how to place video from a post (category video) into a sidebar. I can get other content content images and text to show, I'm guessing it has something to do with post format? If I lable the post formet as video then there must be a call for it.

so far I have:

$args = array( 'numberposts' => 4, 'order'=> 'DESC', 'orderby' => 'post_date', 'category' => 5, 'post_type' =>  'post' ); 
$postslist = get_posts( $args );    
foreach ($postslist as $post) :  setup_postdata($post); ?> 
<div class="sidebar_thumbnail"><?php the_post_thumbnail( 'sidebar_thumbnail' ); ?></div>
<h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>      
<?php endforeach; ?>
</div><!-- end sidebar video posts -->

<?php dynamic_sidebar( 'sidebar1' ); ?>

<?php else : ?>...

but insead of the thumbnail image link to the post I'd rather have the video from the post.


1 Answer 1

  1. You can add a meta field along with your post which contains image/video fram url. Now write a plugin or some PHP code which access particular meta tag of a post. And display it.

  2. As an alternative you can use some plugin like amtyThumb

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.