<?php get_header(); ?>
<div id="slider">
<div class="topslider">
<div class="next">Sig</div>
<div class="prev">Ant</div>
<ul>
<?php $count = of_get_option('w2f_slide_number');
$slidecat =of_get_option('w2f_slide_categories');
$wp_query = new WP_Query();
$wp_query->query('posts_per_page='.$count.'&post_type=video&genre='.$slidecat);
if ($wp_query->have_posts()) : while ($wp_query->have_posts()) : $wp_query->the_post(); ?>
<li>
<?php
$thumb = get_post_thumbnail_id();
$img_url = wp_get_attachment_url( $thumb,'full' ); //get full URL to image (use "large" or "medium" if the images too big)
$image = aq_resize( $img_url, 450, 280, true ); //resize & crop the image
?>
<?php if($image) : ?>
<a href="<?php the_permalink(); ?>"><img class="slide-image" src="<?php echo $image ?>"/></a>
<?php endif; ?>
<div class="slide-caption">
<h3><?php the_title(); ?></h3>
Lo mas visto
</div>
<?php endwhile; endif; ?>
</li>
</ul>
</div>
</div>
<div id="fullcontent">
<div id="topbar" class="clearfix">
<div class="leftinfo"> Últimos Vídeos</div>
</div>
<?php
$temp = $wp_query;
$wp_query= null;
$vcount = of_get_option('w2f_video_count');
$wp_query = new WP_Query();
$wp_query->query('posts_per_page='.$vcount.'&post_type=video&paged='.$paged);
?>
<?php while ($wp_query->have_posts()) : $wp_query->the_post(); ?>
<div class="video-post" id="post-<?php the_ID(); ?>">
<div class="video-title">
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?> </a></h2>
</div>
<?php
$thumb = get_post_thumbnail_id();
$img_url = wp_get_attachment_url( $thumb,'full' ); //get full URL to image (use "large" or "medium" if the images too big)
$image = aq_resize( $img_url, 165, 110, true ); //resize & crop the image
?>
<?php if($image) : ?>
<a href="<?php the_permalink(); ?>"><img class="video-image" src="<?php echo $image ?>"/></a>
<?php endif; ?>
</div>
<!-- post end -->
<?php endwhile; ?>
<div class="clear"></div>
<?php getpagenavi(); ?>
<?php $wp_query = null; $wp_query = $temp;?>
</div>
<?php get_footer(); ?>