Kumi
93ceb845aa
Introduced a hierarchical 'publication status' taxonomy for the 'article' post type, providing a structured way to categorize publication states. Updated front-end views to display the publication status of articles both in listings and on the single article page. This enhancement improves the classification and visibility of articles based on their publication status, aiding in better content organization and user navigation.
40 lines
No EOL
1.6 KiB
PHP
40 lines
No EOL
1.6 KiB
PHP
<?php get_header(); ?>
|
|
|
|
<!-- Article Content -->
|
|
<section class="container my-5">
|
|
<div class="row">
|
|
<div class="col-lg-8 mx-auto">
|
|
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
|
|
<h1 class="display-4"><?php the_title(); ?></h1>
|
|
<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();
|
|
}
|
|
?>
|
|
<p class="text-muted">
|
|
<?php
|
|
$terms = get_the_terms(get_the_ID(), 'publication_status');
|
|
if (!empty($terms) && !is_wp_error($terms)) {
|
|
$term_list = array();
|
|
foreach ($terms as $term) {
|
|
$term_list[] = $term->name;
|
|
}
|
|
echo implode(', ', $term_list);
|
|
}
|
|
?>
|
|
</p>
|
|
<?php if (has_post_thumbnail()) : ?>
|
|
<img src="<?php the_post_thumbnail_url(); ?>" class="img-fluid mb-4" alt="<?php the_title(); ?>">
|
|
<?php endif; ?>
|
|
<?php the_content(); ?>
|
|
<?php endwhile;
|
|
endif; ?>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<?php get_footer(); ?>
|