feat(template): Display author/date in muted text style
Wrapped author name and date in a <p> tag with a muted text class to enhance readability and visual hierarchy on the 'single-letter' template. Additionally, added missing newline after 'register_post_type' call in functions.php for better code formatting. Addresses visual consistency and readability issues.
This commit is contained in:
parent
fb8e7870bc
commit
3cb11088a5
2 changed files with 11 additions and 8 deletions
|
@ -455,6 +455,7 @@ function create_letter_post_type() {
|
|||
|
||||
register_post_type('letter', $args);
|
||||
}
|
||||
|
||||
add_action('init', 'create_letter_post_type');
|
||||
|
||||
function add_letter_meta_boxes() {
|
||||
|
|
|
@ -6,14 +6,16 @@
|
|||
<div class="col-lg-8 mx-auto">
|
||||
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
|
||||
<h1 class="display-4"><?php the_title(); ?></h1>
|
||||
<?php
|
||||
$authors = get_post_meta(get_the_ID(), 'article_authors', true);
|
||||
if (!empty($authors)) {
|
||||
echo implode(', ', array_map('esc_html', $authors));
|
||||
} else {
|
||||
the_author();
|
||||
}
|
||||
?> | <?php the_date(); ?>
|
||||
<p class="text-muted">
|
||||
<?php
|
||||
$authors = get_post_meta(get_the_ID(), 'article_authors', true);
|
||||
if (!empty($authors)) {
|
||||
echo implode(', ', array_map('esc_html', $authors));
|
||||
} else {
|
||||
the_author();
|
||||
}
|
||||
?> | <?php the_date(); ?>
|
||||
</p>
|
||||
<?php if (has_post_thumbnail()) : ?>
|
||||
<img src="<?php the_post_thumbnail_url(); ?>" class="img-fluid mb-4" alt="<?php the_title(); ?>">
|
||||
<?php endif; ?>
|
||||
|
|
Loading…
Reference in a new issue