Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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:

<?php
$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.

Thanks

share|improve this question

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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