Upload file index.php via GUI

This commit is contained in:
2026-03-19 23:50:58 +01:00
parent 383328a6b6
commit 18c07628f5

View File

@@ -3,25 +3,73 @@
<main id="primary" class="site-main">
<div class="container">
<div class="content-area">
<?php if ( have_posts() ) : ?>
<?php while ( have_posts() ) : the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class('post'); ?>>
<?php if ( has_post_thumbnail() ) : ?>
<div class="post-thumbnail">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('medium_large'); ?></a>
<div class="archive-posts-grid">
<?php while ( have_posts() ) : the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class('post archive-post-card'); ?>>
<?php if ( has_post_thumbnail() ) : ?>
<div class="archive-card-thumb">
<a href="<?php the_permalink(); ?>">
<?php the_post_thumbnail('medium_large', array('loading' => 'lazy')); ?>
</a>
</div>
<?php endif; ?>
<div class="archive-card-body">
<?php $cats = get_the_category(); if ( $cats ) : ?>
<div class="archive-card-cats">
<a href="<?php echo esc_url( get_category_link( $cats[0]->term_id ) ); ?>" class="post-category-badge">
<?php echo esc_html( $cats[0]->name ); ?>
</a>
</div>
<?php endif; ?>
<h2 class="archive-card-title">
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
</h2>
<div class="archive-card-meta">
<span><i class="fas fa-calendar-alt"></i> <?php echo esc_html( get_the_date() ); ?></span>
<span><i class="fas fa-user"></i> <?php the_author(); ?></span>
</div>
<div class="archive-card-excerpt">
<?php the_excerpt(); ?>
</div>
<a href="<?php the_permalink(); ?>" class="archive-card-read-more">
<?php _e('Weiterlesen', 'minecraft-modern-theme'); ?> <i class="fas fa-arrow-right"></i>
</a>
</div>
<?php endif; ?>
<div class="post-content">
<h2 class="post-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<div class="post-excerpt">
<?php the_excerpt(); ?>
</div>
</div>
</article>
<?php endwhile; ?>
</article>
<?php endwhile; ?>
</div>
<!-- FIX: Pagination fehlte komplett -->
<div class="archive-pagination">
<?php
the_posts_pagination( array(
'mid_size' => 2,
'prev_text' => '<i class="fas fa-chevron-left"></i> ' . __('Zurück', 'minecraft-modern-theme'),
'next_text' => __('Weiter', 'minecraft-modern-theme') . ' <i class="fas fa-chevron-right"></i>',
) );
?>
</div>
<?php else : ?>
<p><?php _e( 'Keine Beiträge gefunden.', 'minecraft-modern-theme' ); ?></p>
<div class="no-posts-found">
<i class="fas fa-inbox fa-2x"></i>
<p><?php _e('Keine Beiträge gefunden.', 'minecraft-modern-theme'); ?></p>
</div>
<?php endif; ?>
</div>
</div>
</main>