Upload via Git Manager GUI - search.php
This commit is contained in:
@@ -1,107 +1,107 @@
|
|||||||
<?php get_header(); ?>
|
<?php get_header(); ?>
|
||||||
|
|
||||||
<main id="primary" class="site-main">
|
<main id="primary" class="site-main">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="content-area">
|
<div class="content-area">
|
||||||
|
|
||||||
<header class="search-header">
|
<header class="search-header">
|
||||||
<div class="archive-type-badge">
|
<div class="archive-type-badge">
|
||||||
<i class="fas fa-search"></i> <?php _e('Suchergebnisse', 'minecraft-modern-theme'); ?>
|
<i class="fas fa-search"></i> <?php _e('Suchergebnisse', 'minecraft-modern-theme'); ?>
|
||||||
</div>
|
</div>
|
||||||
<h1 class="archive-title">
|
<h1 class="archive-title">
|
||||||
<?php
|
<?php
|
||||||
printf(
|
printf(
|
||||||
__('Ergebnisse für: <span class="search-query">%s</span>', 'minecraft-modern-theme'),
|
__('Ergebnisse für: <span class="search-query">%s</span>', 'minecraft-modern-theme'),
|
||||||
'<em>' . esc_html( get_search_query() ) . '</em>'
|
'<em>' . esc_html( get_search_query() ) . '</em>'
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
</h1>
|
</h1>
|
||||||
<?php global $wp_query; ?>
|
<?php global $wp_query; ?>
|
||||||
<p class="search-result-count">
|
<p class="search-result-count">
|
||||||
<?php printf(
|
<?php printf(
|
||||||
_n('%d Ergebnis gefunden', '%d Ergebnisse gefunden', $wp_query->found_posts, 'minecraft-modern-theme'),
|
_n('%d Ergebnis gefunden', '%d Ergebnisse gefunden', $wp_query->found_posts, 'minecraft-modern-theme'),
|
||||||
$wp_query->found_posts
|
$wp_query->found_posts
|
||||||
); ?>
|
); ?>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<!-- Suchformular zum Verfeinern -->
|
<!-- Suchformular zum Verfeinern -->
|
||||||
<div class="search-refine">
|
<div class="search-refine">
|
||||||
<?php get_search_form(); ?>
|
<?php get_search_form(); ?>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<?php if ( have_posts() ) : ?>
|
<?php if ( have_posts() ) : ?>
|
||||||
|
|
||||||
<div class="archive-posts-grid">
|
<div class="archive-posts-grid">
|
||||||
<?php while ( have_posts() ) : the_post(); ?>
|
<?php while ( have_posts() ) : the_post(); ?>
|
||||||
|
|
||||||
<article id="post-<?php the_ID(); ?>" <?php post_class('post archive-post-card'); ?>>
|
<article id="post-<?php the_ID(); ?>" <?php post_class('post archive-post-card'); ?>>
|
||||||
|
|
||||||
<?php if ( has_post_thumbnail() ) : ?>
|
<?php if ( has_post_thumbnail() ) : ?>
|
||||||
<div class="archive-card-thumb">
|
<div class="archive-card-thumb">
|
||||||
<a href="<?php the_permalink(); ?>">
|
<a href="<?php the_permalink(); ?>">
|
||||||
<?php the_post_thumbnail('medium_large', array('loading' => 'lazy')); ?>
|
<?php the_post_thumbnail('medium_large', array('loading' => 'lazy')); ?>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<div class="archive-card-body">
|
<div class="archive-card-body">
|
||||||
|
|
||||||
<div class="archive-card-type">
|
<div class="archive-card-type">
|
||||||
<?php
|
<?php
|
||||||
$pt = get_post_type_object( get_post_type() );
|
$pt = get_post_type_object( get_post_type() );
|
||||||
echo '<span class="post-type-badge"><i class="fas fa-file-alt"></i> ' . esc_html($pt->labels->singular_name) . '</span>';
|
echo '<span class="post-type-badge"><i class="fas fa-file-alt"></i> ' . esc_html($pt->labels->singular_name) . '</span>';
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2 class="archive-card-title">
|
<h2 class="archive-card-title">
|
||||||
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
|
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
<div class="archive-card-meta">
|
<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-calendar-alt"></i> <?php echo esc_html( get_the_date() ); ?></span>
|
||||||
<span><i class="fas fa-user"></i> <?php the_author(); ?></span>
|
<span><i class="fas fa-user"></i> <?php the_author(); ?></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="archive-card-excerpt">
|
<div class="archive-card-excerpt">
|
||||||
<?php the_excerpt(); ?>
|
<?php the_excerpt(); ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<a href="<?php the_permalink(); ?>" class="archive-card-read-more">
|
<a href="<?php the_permalink(); ?>" class="archive-card-read-more">
|
||||||
<?php _e('Zum Beitrag', 'minecraft-modern-theme'); ?> <i class="fas fa-arrow-right"></i>
|
<?php _e('Zum Beitrag', 'minecraft-modern-theme'); ?> <i class="fas fa-arrow-right"></i>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</article>
|
</article>
|
||||||
|
|
||||||
<?php endwhile; ?>
|
<?php endwhile; ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Pagination -->
|
<!-- Pagination -->
|
||||||
<div class="archive-pagination">
|
<div class="archive-pagination">
|
||||||
<?php
|
<?php
|
||||||
the_posts_pagination( array(
|
the_posts_pagination( array(
|
||||||
'mid_size' => 2,
|
'mid_size' => 2,
|
||||||
'prev_text' => '<i class="fas fa-chevron-left"></i> ' . __('Zurück', 'minecraft-modern-theme'),
|
'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>',
|
'next_text' => __('Weiter', 'minecraft-modern-theme') . ' <i class="fas fa-chevron-right"></i>',
|
||||||
) );
|
) );
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php else : ?>
|
<?php else : ?>
|
||||||
|
|
||||||
<div class="no-posts-found">
|
<div class="no-posts-found">
|
||||||
<i class="fas fa-search fa-3x" style="opacity:0.3; margin-bottom:20px;"></i>
|
<i class="fas fa-search fa-3x" style="opacity:0.3; margin-bottom:20px;"></i>
|
||||||
<h2><?php _e('Keine Ergebnisse gefunden', 'minecraft-modern-theme'); ?></h2>
|
<h2><?php _e('Keine Ergebnisse gefunden', 'minecraft-modern-theme'); ?></h2>
|
||||||
<p><?php printf( __('Deine Suche nach <strong>%s</strong> hat keine Treffer ergeben.', 'minecraft-modern-theme'), esc_html( get_search_query() ) ); ?></p>
|
<p><?php printf( __('Deine Suche nach <strong>%s</strong> hat keine Treffer ergeben.', 'minecraft-modern-theme'), esc_html( get_search_query() ) ); ?></p>
|
||||||
<p><?php _e('Versuche es mit anderen Suchbegriffen oder schau dir unsere letzten Beiträge an.', 'minecraft-modern-theme'); ?></p>
|
<p><?php _e('Versuche es mit anderen Suchbegriffen oder schau dir unsere letzten Beiträge an.', 'minecraft-modern-theme'); ?></p>
|
||||||
<?php get_search_form(); ?>
|
<?php get_search_form(); ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
<?php get_footer(); ?>
|
<?php get_footer(); ?>
|
||||||
Reference in New Issue
Block a user