fictioneer/partials/_loop.php

44 lines
925 B
PHP
Raw Normal View History

2023-01-21 01:31:34 +01:00
<?php
/**
* Partial: Loop
*
* Renders a list of full-width posts paginated using the "Blog pages show at most"
* (posts_per_page) option under Settings > Reading.
*
* @package WordPress
* @subpackage Fictioneer
* @since 3.0
* @see partials/_post.php
*/
// No direct access!
defined( 'ABSPATH' ) OR exit;
?>
2023-01-21 01:31:34 +01:00
<?php if ( have_posts() ) : ?>
<section class="blog-posts">
2023-01-21 01:31:34 +01:00
<?php
while ( have_posts() ) {
the_post();
get_template_part( 'partials/_post', null, array( 'context' => 'loop' ) );
2023-01-21 01:31:34 +01:00
}
$pag_args = array(
'prev_text' => fcntr( 'previous' ),
'next_text' => fcntr( 'next' )
);
?>
</section>
2024-08-12 02:42:45 +02:00
<nav class="pagination _padding-top"><?php echo fictioneer_paginate_links( $pag_args ); ?></nav>
2023-01-21 01:31:34 +01:00
2023-11-30 17:52:19 +01:00
<?php else : ?>
2023-01-21 01:31:34 +01:00
2024-08-12 02:42:45 +02:00
<article class="post _empty">
2023-09-16 14:25:26 +02:00
<span><?php _e( 'No (more) posts found.', 'fictioneer' ); ?></span>
2023-01-21 01:31:34 +01:00
</article>
<?php endif; ?>