Using iframes to load new video when thumbnails are clicked
I’m trying to create a video page for my client. I want the most recent post to show in the main iframe on the page when they go to the page. Then, when they click the thumbnails displayed across the bottom, it will load any previous videos into that iframe. Can anyone help?
It’s a two parter:
1) What is the best way to get my thumbnails to load the content of my most recent posts (the content will just be the embedded youtube video that I paste into the post)?
2) How do I display just the video from the most recent post in my iframe to begin with?
See here for what I’ve got so far http://www.realfactsrealpeople.com/category/videos/opinions/
The iframe I’m trying to use is this:
<iframe name="video" src="<?php $recent = new WP_Query("cat=5&showposts=1"); while($recent->have_posts()) : $recent->the_post();?> <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyeleven' ) ); ?> <?php endwhile; ?>" allowTransparency="true"> </iframe>
- The topic ‘Using iframes to load new video when thumbnails are clicked’ is closed to new replies.