Files
Bookshelf/Old/bd-murphy-author/archive-series.php
bdm 38cdebd0c6 Track Bookshelf WordPress theme, plugins and specs
Initial import of the bdmurphy Bookshelf work: the bd-bookshelf theme,
bd-bookshelf-plugin, bd-bookshelfhelper and bd-simpleemail plugins, plus
the specification documents, mockups and release archives.
2026-09-28 06:24:25 -07:00

46 lines
1.6 KiB
PHP

<?php
/**
* Template Name: Series Listing
*/
get_header();
?>
<div class="series-container">
<header class="page-header">
<h1 class="page-title"><?php esc_html_e('Series', 'bd-murphy'); ?></h1>
</header>
<div class="series-list">
<?php
if (have_posts()) :
while (have_posts()) :
the_post();
$series_id = get_the_ID();
$cover_url = BD_BookShelfHelper::get_series_cover_url($series_id, 'series-card');
$name = get_the_title();
$slug = get_post_field('post_name');
$blurb = BD_BookShelfHelper::get_series_blurb($series_id);
$book_count = BD_BookShelfHelper::get_series_book_count($series_id);
?>
<article class="series-card">
<a href="<?php the_permalink(); ?>">
<img src="<?php echo esc_url($cover_url); ?>" alt="<?php echo esc_attr($name); ?>" class="series-cover">
</a>
<h2 class="series-name">
<a href="<?php the_permalink(); ?>"><?php echo esc_html($name); ?></a>
</h2>
<p class="series-blurb"><?php echo esc_html($blurb); ?></p>
<p class="series-book-count"><?php printf(esc_html(_n('%d book', '%d books', $book_count, 'bd-murphy')), $book_count); ?></p>
</article>
<?php
endwhile;
else :
?>
<p class="no-series"><?php esc_html_e('No series available yet.', 'bd-murphy'); ?></p>
<?php endif; ?>
</div>
</div>
<?php
get_footer();