Webseite-Freund-des-Spessarts/theme/friends-spessart/single-news.php

28 lines
1023 B
PHP

<?php get_header(); ?>
<?php while ( have_posts() ) : the_post(); ?>
<main id="inhalt" class="page-main">
<?php
get_template_part( 'parts/page-head', null, array(
'title' => get_the_title(),
'kicker' => 'Aktuelles · ' . get_the_date( 'j. F Y' ),
) );
?>
<article class="page-wrap">
<?php if ( has_post_thumbnail() ) : ?>
<figure class="content-hero-image"><?php the_post_thumbnail( 'fds-hero' ); ?></figure>
<?php endif; ?>
<div class="entry-content"><?php the_content(); ?></div>
<?php $tags = get_the_terms( get_the_ID(), 'post_tag' ); ?>
<?php if ( $tags && ! is_wp_error( $tags ) ) : ?>
<div class="entry-tags">
<?php foreach ( $tags as $tag ) : ?>
<span class="tag-pill"><?php echo esc_html( $tag->name ); ?></span>
<?php endforeach; ?>
</div>
<?php endif; ?>
<p class="back-link"><a href="<?php echo esc_url( get_post_type_archive_link( 'news' ) ); ?>">&lsaquo; Alle Meldungen</a></p>
</article>
</main>
<?php endwhile; ?>
<?php get_footer(); ?>