<?php get_header(); ?>
<section id="newsMovies">
<h1>Nuevos estrenos</h1>
<?php foreach ( get_option('newsMovies') as $id ): ?>
<a href="<?= get_permalink($id) ?>">
<?php if (has_post_thumbnail($id)) : ?>
<?= get_the_post_thumbnail($id, 'front-news'); ?>
<?php else : ?>
<img width="130" src="<?= bloginfo('template_directory').'/images/no-image.png'; ?>" class="wp-post-image">
<?php endif; ?>
</a>
<?php endforeach; ?>
<?php /* while ( $rm_newsMovies->have_posts() ) : $rm_newsMovies->the_post(); ?>
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
<?php if (has_post_thumbnail()) : ?>
<?= the_post_thumbnail('front-news'); ?>
<?php else : ?>
<img width="130" src="<?= bloginfo('template_directory').'/images/no-image.png'; ?>" class="wp-post-image">
<?php endif; ?>
</a>
<?php endwhile; */ ?>
</section>
<?php get_sidebar(); ?>
<section id="movies">
<nav>
<a href="#news" class="active">Novedades</a>
<a href="#views">Más vistas</a>
<a href="#score">Mejor puntuadas</a>
</nav>
<?php while ( $rm_movies->have_posts() ) : $rm_movies->the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
<?php if (has_post_thumbnail()) : ?>
<?php the_post_thumbnail(); ?>
<?php else : ?>
<img src="<?= bloginfo('template_directory').'/images/no-image.png'; ?>" class="wp-post-image">
<?php endif; ?>
</a>
<div class="info">
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><h2><?php the_title(); ?></h2></a>
<?php echo (is_object(PostRatings())) ? PostRatings()->getControl($post->ID, false, true) : ''; ?>
<br />
<?php sm_flags($post->ID); ?>
</div>
</article>
<?php endwhile; ?>
<?php if (function_exists('wp_pagenavi')) {
wp_pagenavi();
} else { ?>
<div class="navigation">
<div class="alignleft">
<?php next_posts_link(__('Older Entries','my_theme')); ?>
</div>
<div class="alignright">
<?php previous_posts_link(__('Newer Entries','my_theme')); ?>
</div>
</div>
<?php } ?>
</section>
<?php get_footer(); ?>