<!--
Template Name: Listar Links Importantes
-->
<?php get_header(); ?> <!-- Mostrar o cabeçalho -->
	
<!--
*********************************************************
*              Inicio do Conteúdo principal             *
*********************************************************
-->	
<div id="conteudo" class="row">


<!--
*********************************************************
*                   Conteúdo Principal                  *
*********************************************************
-->	
	<div id="noticia_progepe" class="small-12 medium-12 large-12 columns centered">

	   <h2> Links Importantes </h2>
	<?php wp_reset_query();  ?>

<?php 
	
	$paged = get_query_var('paged') ? get_query_var('paged') : 1;

	$args = array(
		'post_type'			=> 'links-importantes',
		'posts_per_page' 	=> 2,
		'order' 			=> 'DESC',
		'orderby'  			=> 'date',
		'paged' 			=> $paged
    );
	
	$consulta = new WP_Query( $args );
	
 	while ($consulta->have_posts()) : $consulta->the_post(); ?>


        <!-- Coloca o título da notícia -->
		<h3><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h3> 
		
		<!-- Coloca o resumo do evento -->
		<div style="margin-left:0.3em;">
			<?php the_excerpt(); ?>
		</div>
        
		<button class="veja_mais">
			<a href="<?php the_permalink() ?>">Leia mais... </a>
		</button>
		
		<hr>
	<?php endwhile; ?>

<!--
*********************************************************
*                  Plugin WP_PAGENAVI                   *
*   Mostra a paginação se este plugin estiver ativado   *
*********************************************************
-->	
 		<?php if(function_exists('wp_pagenavi')) { wp_pagenavi(array('query'=> $consulta));} ?>

</div>

	
 </div> <!-- fechamento da div conteudo -->
<?php get_footer(); ?> <!-- Mostrar o rodapé -->