2019-05-23 12:30:31 -04:00
|
|
|
<?php
|
|
|
|
/**
|
2021-07-10 11:06:12 -04:00
|
|
|
* The default archive page template.
|
2019-05-23 12:30:31 -04:00
|
|
|
*
|
2021-07-09 15:43:11 -04:00
|
|
|
* @author Adam Piontek
|
2019-05-23 12:30:31 -04:00
|
|
|
* @since 1.0.0
|
|
|
|
*/
|
|
|
|
|
2021-07-02 10:24:48 -04:00
|
|
|
namespace WP_73k;
|
2019-05-23 12:30:31 -04:00
|
|
|
|
|
|
|
get_header(); ?>
|
2021-07-06 09:45:09 -04:00
|
|
|
<main class="container d-flex justify-content-center">
|
2021-07-06 15:31:46 -04:00
|
|
|
<div class="col-12 col-md-10 col-lg-9 col-xl-8 col-xxl-7 pb-2 mb-4 mt-3">
|
|
|
|
|
2022-12-26 11:49:00 -05:00
|
|
|
|
|
|
|
|
|
|
|
<?php if (is_author()) :
|
|
|
|
// If a user has filled out their description, show a bio on their entries.
|
|
|
|
if ( get_the_author_meta( 'description' ) ) { ?>
|
|
|
|
<div id="author-info" class="d-flex flex-row mb-4 tek-border-bottom-gray-dashed">
|
2022-12-26 11:52:15 -05:00
|
|
|
<div id="author-avatar" class="flex-shrink-0">
|
|
|
|
<?php echo get_avatar( get_the_author_meta( 'user_email' ), $size = '96', $default = '', $alt = '', $args = array( 'class' => 'rounded-3 me-3 pt-1' )); ?>
|
2022-12-26 11:49:00 -05:00
|
|
|
</div><!-- #author-avatar -->
|
|
|
|
<div id="author-description" class="flex-grow-1 mb-2">
|
|
|
|
<h1 class="text-muted fst-italic mb-0"><?php printf( __( 'Author: %s', '' ), get_the_author() ); ?></h1>
|
|
|
|
<?php the_author_meta( 'description' ); ?>
|
|
|
|
</div><!-- #author-description -->
|
|
|
|
</div><!-- #entry-author-info -->
|
|
|
|
<?php } else {
|
|
|
|
// if user does not have description, show standard archive title
|
|
|
|
?>
|
|
|
|
<h1 class="text-muted fst-italic mb-4 tek-border-bottom-gray-dashed"><?= get_the_archive_title(); ?></h1>
|
|
|
|
<?php } ?>
|
|
|
|
|
|
|
|
<?php elseif (is_archive()) : ?>
|
2021-08-04 16:40:42 -04:00
|
|
|
<h1 class="text-muted fst-italic mb-4 tek-border-bottom-gray-dashed"><?= get_the_archive_title(); ?></h1>
|
2021-07-10 11:06:12 -04:00
|
|
|
|
2021-07-06 15:31:46 -04:00
|
|
|
<?php
|
2021-07-10 17:13:24 -04:00
|
|
|
endif;
|
|
|
|
if ( have_posts() ) :
|
|
|
|
while ( have_posts() ) :
|
2021-07-09 12:20:38 -04:00
|
|
|
the_post();
|
|
|
|
echo get_template_part( 'content-templates/content', 'article' );
|
2021-07-10 17:13:24 -04:00
|
|
|
endwhile;
|
2021-08-04 16:40:42 -04:00
|
|
|
|
|
|
|
// output listing pagination if not singular
|
|
|
|
if (!is_singular()) :
|
2021-07-10 10:42:28 -04:00
|
|
|
?>
|
|
|
|
|
|
|
|
<nav class="d-flex justify-content-between" aria-label="Page navigation">
|
2021-08-04 16:40:42 -04:00
|
|
|
<div class="nav-previous alignleft">
|
|
|
|
<?php
|
|
|
|
$txt = inline_svg( 'mdi-chevron-left', array( 'div_class' => 'icon baseline me-1' ) ) . 'Older';
|
|
|
|
next_posts_link( $txt ); ?>
|
|
|
|
</div>
|
|
|
|
<div class="nav-next alignright">
|
|
|
|
<?php
|
|
|
|
$txt = 'Newer' . inline_svg( 'mdi-chevron-right', array( 'div_class' => 'icon baseline ms-1' ) );
|
|
|
|
previous_posts_link( $txt ); ?>
|
|
|
|
</div>
|
2021-07-10 10:42:28 -04:00
|
|
|
</nav>
|
|
|
|
|
2021-08-04 16:40:42 -04:00
|
|
|
<?php endif;
|
2021-07-10 17:13:24 -04:00
|
|
|
endif;
|
2021-07-09 12:20:38 -04:00
|
|
|
?>
|
2021-07-06 15:31:46 -04:00
|
|
|
|
2021-07-04 18:16:33 -04:00
|
|
|
</div>
|
2021-07-06 09:45:09 -04:00
|
|
|
</main>
|
|
|
|
<?php
|
2021-08-04 16:40:42 -04:00
|
|
|
get_footer();
|