add beta rfo

This commit is contained in:
2025-06-18 13:44:08 +03:00
parent b0536e98b8
commit bd95014d3b
16 changed files with 347 additions and 186 deletions

22
rfo/post-list.php Normal file
View File

@@ -0,0 +1,22 @@
<?php
global $wp_query;
$large_first_image = $args['large_first_image'] ?? true;
$post_counter = 0;
$query = $args['query'] ?? $wp_query;
if ($query->have_posts()) {
while ($query->have_posts()) {
$post_counter++;
$end = $query->post_count;
$query->the_post();
if ( $post_counter == 1 ) :
get_template_part('content', 'post-main-rfo', ['full_width' => $post_count === 1 ]);
elseif ( $post_counter == 2) :
get_template_part('content', 'post-rfo', ['full_width' => $post_count === 1 && $large_first_image]);
else:?>
<?get_template_part('content', 'post-rfo', ['full_width' => false]);?>
<?php endif; ?>
<?wp_reset_postdata();
}
}?>