-
Notifications
You must be signed in to change notification settings - Fork 0
/
archive-medienspiegel.php
112 lines (67 loc) · 2.55 KB
/
archive-medienspiegel.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<?php
/*
oona
1. Archive Subtitle removed
*/
get_header(); ?>
<main id="site-content" role="main">
<?php
$archive_title = get_the_archive_title();
$archive_subtitle = get_the_archive_description( '<div>', '</div>' );
// Check if we should show the archive header on the blog page
$show_home_header = get_theme_mod( 'chaplin_show_archive_header_on_home', false );
if ( ( ! is_home() || is_home() && $show_home_header ) && ( $archive_title || $archive_subtitle ) ) : ?>
<header class="archive-header section-inner">
<?php do_action( 'chaplin_archive_header_start' ); ?>
<?php if ( $archive_title ) : ?>
<h1 class="archive-title"><?php echo wp_kses_post( $archive_title ); ?></h1>
<?php endif;
// OONA Archive Subtitle removed
?>
<?php do_action( 'chaplin_archive_header_end' ); ?>
</header><!-- .archive-header -->
<?php endif; ?>
<?php ?>
<div class="posts section-inner">
<?php if ( have_posts() ) :
do_action( 'chaplin_posts_start' );
$post_grid_column_classes = chaplin_get_post_grid_column_classes();
?>
<div class="posts-grid grid load-more-target <?php echo $post_grid_column_classes; ?>">
<?php
// Calculate the current offset
$iteration = $wp_query->get( 'posts_per_page' ) * $wp_query->get( 'paged' );
while ( have_posts() ) : the_post();
$iteration++;
/**
* Fires before output of a grid item in the posts loop.
*
* Allows output of custom elements within the posts loop, like banners.
* To add markup spanning the entire width of the posts grid, wrap it in the following element:
* <div class="grid-item col-1">[Your content]</div>
* @param int $post_id Post ID.
* @param int $iteration The current iteration of the loop.
*/
do_action( 'chaplin_posts_loop_before_grid_item', $post->ID, $iteration );
?>
<div class="grid-item">
<?php get_template_part( 'preview-medienspiegel', get_post_type() ); ?>
</div><!-- .grid-item -->
<?php
/**
* Fires after output of a grid item in the posts loop.
*/
do_action( 'chaplin_posts_loop_after_grid_item', $post->ID, $iteration );
endwhile;
?>
</div><!-- .posts-grid -->
<?php do_action( 'chaplin_posts_end' ); ?>
<?php elseif ( is_search() ) : ?>
<div class="no-search-results-form">
<?php get_search_form(); ?>
</div><!-- .no-search-results -->
<?php endif; ?>
</div><!-- .posts -->
<?php get_template_part( 'pagination' ); ?>
</main><!-- #site-content -->
<?php get_footer(); ?>