<?php

/* Template Name: Homepage */

?>
<?php  get_header(); ?>
<div id="content">
	<div id="contentleft">
		<div id="slider-artigos">
			<?php echo do_shortcode("[metaslider id=269]"); ?>
		</div>
		<div id="newsletter">
			<p>Receba os novos artigos no seu email e permane&ccedil;a em seguran&ccedil;a:</p>
			<p>NOME [__________]  EMAIL [__________]</p>
		</div>
		<?php
			$args = array( 'posts_per_page' => 100000, 'order'=> 'DESC', 'orderby' => 'date' );
			$postslist = get_posts( $args );
			foreach ( $postslist as $post ) : setup_postdata( $post );
		?>
		<div>
			<?php get_the_image(); ?>
			<?php the_date(); ?>
			<br />
			<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
			<?php the_excerpt(); ?>
			<a href="<?php the_permalink(); ?>">Ler mais</a>
			<br />
			<br />
		</div>
		<?php endforeach; wp_reset_postdata(); ?>
	</div>
<?php wp_pagenavi(); ?>
<?php include(TEMPLATEPATH."/r_sidebar.php"); ?>
</div><!-- The main column ends  -->
<?php get_footer(); ?>
