category page with pagination and filter
This commit is contained in:
parent
8f0051ee22
commit
528ddcee31
3 changed files with 3630 additions and 0 deletions
67
kit/category.php
Normal file
67
kit/category.php
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
<?php
|
||||
get_header();
|
||||
?>
|
||||
|
||||
<main>
|
||||
|
||||
<section class="background-color-white category">
|
||||
<div class="content-wrap">
|
||||
<h2>
|
||||
<?php $categories = get_the_category();
|
||||
if ( ! empty( $categories ) ) {
|
||||
echo esc_html( $categories[0]->name );
|
||||
} ?>
|
||||
</h2>
|
||||
|
||||
<div class="container container-3-cols">
|
||||
|
||||
<?php
|
||||
if ( have_posts() ) :
|
||||
while ( have_posts() ) :
|
||||
|
||||
the_post();
|
||||
?>
|
||||
<div class="column">
|
||||
<div class="teaser-box teaser-box-color-brand-secondary" id="c959">
|
||||
<?php echo '<a href="' . esc_url( get_permalink() ) . '">'; ?>
|
||||
<figure class="teaser-box-image">
|
||||
<?php if ( has_post_thumbnail() ) { ?>
|
||||
<img src="<?php echo get_the_post_thumbnail_url(); ?>">
|
||||
<?php } ?>
|
||||
</figure>
|
||||
</a>
|
||||
<?php echo '<a href="' . esc_url( get_permalink() ) . '">'; ?>
|
||||
<h3>
|
||||
<?php echo esc_html( get_the_title() ); ?>
|
||||
</h3>
|
||||
</a>
|
||||
<p>
|
||||
<?php echo wp_strip_all_tags( get_the_excerpt(), true ); ?>
|
||||
</p>
|
||||
<?php echo '<a href="' . esc_url( get_permalink() ) . '" class="teaser-box-category-marker">'; ?>
|
||||
Zum Beitrag
|
||||
<div class="icon"></div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
endwhile;
|
||||
wp_reset_postdata();
|
||||
endif;
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</main>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
get_template_part('template-parts/sidebar');
|
||||
get_footer();
|
||||
Loading…
Add table
Add a link
Reference in a new issue