-
Notifications
You must be signed in to change notification settings - Fork 0
/
page-blog.php
66 lines (53 loc) · 2.65 KB
/
page-blog.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
<?php get_header(); ?>
<div class="pt-5 pb-5">
<div class="container">
<div class="row pb-3">
<div class="col d-flex justify-content-between">
<h2>Neuigkeiten aus dem Maker Space</h2>
<a href="/feed" title="Veranstaltungen als RSS" class="mr-2">
<img src="<?php echo get_template_directory_uri(); ?>/icons/rss_24px.svg">
</a>
</div>
</div>
<div class="row">
<?php
$posts = get_posts(array(
'post_type' => 'post',
'posts_per_page' => -1
));
?>
<?php foreach ($posts as $post) : ?>
<a href="<?php echo get_permalink(); ?>" class="col-12 col-md-6 col-xl-4 mb-5 d-flex flex-column text-dark" style="text-decoration: none;">
<?php if (has_post_thumbnail()) : ?>
<div class="" style="min-height: 250px;max-height: 250px; background-color: rgb(0,0,0,0.3); background-image: url(<?php the_post_thumbnail_url('medium'); ?>); background-size: cover; background-position: center;"></div>
<?php else : ?>
<div class="" style="min-height: 250px;max-height: 250px; background-color: rgb(0,0,0,0.3); background-image: url(<?php echo get_template_directory_uri(); ?>/images/image-missing.png); background-size: cover; background-position: center;"></div>
<?php endif; ?>
<div class="bg-white flex-fill p-2">
<h5 class="">
<?php the_title() ?>
</h5>
</div>
<div class="bg-white p-3 text-truncate text-wrap text-justify" style="max-height: 250px; height: 100%;">
<p>
<?php
if (has_excerpt()) :
the_excerpt();
// else :
// the_content();
endif;
?>
</p>
</div>
<div class="bg-white p-3 pt-auto" style="font-size: 0.72rem;">
<div class="text-secondary">von <?php the_author_meta('display_name', $post->post_author) ?></div>
<div class="text-secondary">veröffentlicht am
<?php echo get_the_date() ?>
</div>
</div>
</a>
<?php endforeach; ?>
</div>
</div>
</div>
<?php get_footer(); ?>