Enhance Theme Templates and Editor Layout

This commit is contained in:
2026-07-27 12:34:55 +02:00
parent cbcdbc1bb8
commit 243fb51770
14 changed files with 382 additions and 82 deletions
+49 -13
View File
@@ -1,17 +1,53 @@
<?php get_header(); ?>
<main id="main" class="site-main">
<?php // The singular main query normally has one post, but retain the standard loop contract.
while ( have_posts() ) { the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header"><div class="entry-meta"><time datetime="<?php echo esc_attr( get_the_date( DATE_W3C ) ); ?>"><?php echo esc_html( get_the_date() ); ?></time> · <?php the_author_posts_link(); ?></div><?php the_title( '<h1 class="entry-title">', '</h1>' ); ?><?php // Omit category markup entirely when the post has no assigned categories.
if ( has_category() ) { ?><div class="taxonomy post-categories"><?php the_category( ' ' ); ?></div><?php } ?></header>
<?php if ( has_post_thumbnail() ) { ?><div class="entry-thumbnail"><?php the_post_thumbnail( 'large' ); ?></div><?php } ?>
<div class="entry-content"><?php the_content(); wp_link_pages(); ?></div>
<footer class="entry-footer"><?php // Tags render separately so untagged posts avoid empty taxonomy output.
if ( has_tag() ) { ?><div class="tags-links"><?php the_tags( '', ' ', '' ); ?></div><?php } ?></footer>
</article>
<?php // Retain existing discussions even after comments are closed.
if ( comments_open() || get_comments_number() ) { comments_template(); } the_post_navigation(); ?>
<?php } ?>
<?php
// The singular main query normally has one post, but retain the standard loop contract.
while ( have_posts() ) {
the_post();
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<div class="entry-meta">
<time datetime="<?php echo esc_attr( get_the_date( DATE_W3C ) ); ?>"><?php echo esc_html( get_the_date() ); ?></time> · <?php the_author_posts_link(); ?>
</div>
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
<?php
// Omit category markup entirely when the post has no assigned categories.
if ( has_category() ) {
?>
<div class="taxonomy post-categories"><?php the_category( ' ' ); ?></div>
<?php
}
?>
</header>
<?php if ( has_post_thumbnail() ) { ?>
<div class="entry-thumbnail"><?php the_post_thumbnail( 'large' ); ?></div>
<?php } ?>
<div class="entry-content">
<?php
the_content();
wp_link_pages();
?>
</div>
<footer class="entry-footer">
<?php
// Tags render separately so untagged posts avoid empty taxonomy output.
if ( has_tag() ) {
?>
<div class="tags-links"><?php the_tags( '', ' ', '' ); ?></div>
<?php
}
?>
</footer>
</article>
<?php
// Retain existing discussions even after comments are closed.
if ( comments_open() || get_comments_number() ) {
comments_template();
}
the_post_navigation();
}
?>
</main>
<?php get_footer();