Wordpress-Blog/themes/AlmaMater/content.php
Eugene van Aubel 8cefe8bc25 Added les 2
2024-10-01 19:38:17 +02:00

72 lines
1.8 KiB
PHP

<?php
/**
* The template for displaying posts.
*
* This is the template that displays all pages by default.
* It is used to display archive pages and stands in place of
* index.php when displaying a page for a custom post type called "Post".
*
* Please note that this is the WordPress construct of all post types.
* Other post types, such as 'post' uses 'index.php' (which this file as well).
* We've added a few "hooks" to enhance the functionality of this template.
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
* @package WordPress
* @subpackage Twenty_Twenty_One
* @since 1.0
* @version 1.0
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<?php
if ( has_post_thumbnail() ) :
the_post_thumbnail();
endif;
if ( is_singular() ) :
the_title( '<h1 class="entry-title">', '</h1>' );
else :
the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );
endif;
if ( 'post' === get_post_type() ) :
?>
<div class="entry-meta">
<?php twentytwentyone_entry_meta_date(); ?>
</div><!-- .entry-meta -->
<?php endif; ?>
</header>
<div class="entry-content">
<?php
the_content(
sprintf(
/* translators: %s: Name of current post */
wp_kses(
__( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentytwentyone' ),
array(
'span' => array( 'class' => '' ),
)
),
get_the_title()
)
);
wp_link_pages(
array(
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'twentytwentyone' ),
'after' => '</div>',
'link_before' => '<span class="page-number">',
'link_after' => '</span>',
)
);
?>
</div>
<footer class="entry-footer">
<?php twentytwentyone_entry_footer(); ?>
</footer>
</article>