'_wp_page_template', 'meta_value' => "template-archive-news.php" ); $relatedPageTemplatePage = get_pages($args) ? get_pages($args)[0] : null; $pageIcon = get_field('page_icon', get_queried_object_id()) ?? null; $posts_per_page = 12; $args = array( "post_type" => "post", "status" => "publish", "posts_per_page" => $posts_per_page, // "paged" => 1, ); $posts = new WP_Query($args); ?>
$pageIcon, "title" => get_the_title(get_queried_object_id()), "description" => __("Qu'y a-t-il de nouveau chez Homegrade ?", "homegrade-theme__texte-fonctionnel"), )); ?>

found_posts ?>

posts as $key => $post) { $post_thumbnail = get_the_post_thumbnail($post->ID, 'full', array('class' => 'card-news__thumbnail card-post__thumbnail')) ?? null; $news_type = get_the_terms($post->ID, "news_type") ?? null; $post_date = get_the_date('j.m.Y', $post->ID) ?? null; get_template_part( 'template-components/cards/card-news', null, array( 'card_variant' => 'activite', 'post_ID' => $post->ID, 'post_title' => $post->post_title, 'post_thumbnail' => $post_thumbnail, 'news_type' => $news_type, 'post_date' => $post_date, ) ); } ?>
max_num_pages > 1) : ?>