39 lines
1.1 KiB
PHP
39 lines
1.1 KiB
PHP
<?php
|
|
/**
|
|
* Posts page.
|
|
*
|
|
* @package Gustavo_Portfolio
|
|
*/
|
|
|
|
get_header();
|
|
|
|
?>
|
|
|
|
<main id="primary" class="site-main news-index">
|
|
<header class="news-page-heading"><div class="site-shell"><h1><?php esc_html_e( 'Últimas notícias', 'gustavoo-portfolio' ); ?></h1></div></header>
|
|
|
|
<div class="site-shell news-index__content">
|
|
<?php if ( have_posts() ) : ?>
|
|
<div class="latest-news-grid">
|
|
<?php
|
|
$gustavoo_news_index = 0;
|
|
$gustavoo_displayed_post_ids = array();
|
|
while ( have_posts() ) {
|
|
the_post();
|
|
$gustavoo_displayed_post_ids[] = get_the_ID();
|
|
get_template_part( 'template-parts/global/latest-news-card', null, array( 'featured' => 0 === $gustavoo_news_index ) );
|
|
$gustavoo_news_index++;
|
|
}
|
|
?>
|
|
</div>
|
|
<?php get_template_part( 'template-parts/global/latest-news-list', null, array( 'exclude' => $gustavoo_displayed_post_ids ) ); ?>
|
|
<?php gustavoo_portfolio_pagination(); ?>
|
|
<?php else : ?>
|
|
<?php get_template_part( 'template-parts/content/content', 'none' ); ?>
|
|
<?php endif; ?>
|
|
</div>
|
|
</main>
|
|
|
|
<?php
|
|
get_footer();
|