73 lines
2.6 KiB
PHP
73 lines
2.6 KiB
PHP
<?php
|
|
// Copyright 2026 Umbra Tools (umbratools.com)
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
/**
|
|
* Template Name: Blog
|
|
*/
|
|
|
|
get_header();
|
|
?>
|
|
|
|
<div class="blog-container">
|
|
<header class="page-header">
|
|
<h1 class="page-title"><?php single_post_title('', true); ?: esc_html_e('Blog', 'bd-murphy'); ?></h1>
|
|
</header>
|
|
|
|
<div class="blog-list">
|
|
<?php
|
|
if (have_posts()) :
|
|
while (have_posts()) :
|
|
the_post();
|
|
?>
|
|
<article id="post-<?php the_ID(); ?>" <?php post_class('blog-entry'); ?>>
|
|
<div class="blog-entry-inner">
|
|
<?php if (has_post_thumbnail()) : ?>
|
|
<div class="blog-entry-thumbnail">
|
|
<a href="<?php the_permalink(); ?>">
|
|
<?php the_post_thumbnail('blog-thumb'); ?>
|
|
</a>
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<header class="blog-entry-header">
|
|
<h2 class="blog-entry-title">
|
|
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
|
|
</h2>
|
|
<div class="blog-entry-meta">
|
|
<span class="blog-entry-date"><?php bdm_posted_on(); ?></span>
|
|
<?php
|
|
$categories = get_the_category();
|
|
if (!empty($categories)) {
|
|
echo '<span class="blog-entry-category">' . esc_html($categories[0]->name) . '</span>';
|
|
}
|
|
if (get_theme_mod('show_read_time', true)) {
|
|
echo '<span class="blog-entry-readtime">' . bdm_display_reading_time() . '</span>';
|
|
}
|
|
?>
|
|
</div>
|
|
</header>
|
|
|
|
<div class="blog-entry-excerpt">
|
|
<?php the_excerpt(); ?>
|
|
</div>
|
|
</div>
|
|
</article>
|
|
<?php
|
|
endwhile;
|
|
|
|
the_posts_pagination(array(
|
|
'mid_size' => 2,
|
|
'prev_text' => __('Previous', 'bd-murphy'),
|
|
'next_text' => __('Next', 'bd-murphy'),
|
|
));
|
|
else :
|
|
?>
|
|
<p class="no-posts"><?php esc_html_e('No posts found.', 'bd-murphy'); ?></p>
|
|
<?php endif; ?>
|
|
</div>
|
|
</div>
|
|
|
|
<?php
|
|
get_footer();
|