forked from studio-arrenberg/freibad-mirke
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsingle-event.php
90 lines (80 loc) · 3.03 KB
/
single-event.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
<?php
/**
*
* Template Name: Events [Default]
* Template Post Type: event
*
*/
?>
<?php get_header(); ?>
<div class="" id="post-<?php the_ID(); ?>" > <?php// post_class(); ?>
<div class="relative md:px-12 container shrink mx-auto">
<div id="post-<?php the_ID(); ?>" <?php post_class('mb-24 flex flex-wrap md:flex-nowrap'); ?>>
<div class=" md:w-1/2 ">
<div class="relative">
<div class="z-0 ">
<?php
$image = get_field('event-image');
$size = 'square_l'; // (thumbnail, medium, large, full or custom size)
if( $image ) {
echo wp_get_attachment_image( $image, $size );
}
?>
</div>
<div class="p-4 drop-shadow-2xl z-40 hover:animate-spin-slow font-bold font-serif text-base md:text-xl md:w-40 md:h-40 w-28 h-28 text-black bg-white flex place-items-center rounded-full absolute md:-bottom-20 md:-right-20 -bottom-14 -right-14">
<div class="text-base md:text-2xl w-full h-full text-center flex place-items-center">
<div>
<?php
$unixtimestamp = strtotime( get_field('event-date') );
// Display date in the format "l d F, Y".
the_field("event-date");
?>
</div>
</div>
</div>
</div>
</div>
<div class="ml-0 md:ml-24 mt-10 md:mt-60 md:p-6 md:w-1/2 md:pl-16 md:pt-6 text-primary place-items-center">
<div class="">
<h2 class="font-serif bold text-primary entry-title text-xl md:text-2xl font-extrabold leading-snug mb-4">
<?php the_title(); ?>
</h2>
<p class="text-primary">
<?php
$venue = get_field('event-location');
if( $venue ): ?>
<?php echo esc_html( $venue->post_title ); ?>
<?php endif; ?>
</p>
<button class="w-full mt-10 mb-4 btn btn-white">
<a href="<?php the_field("event-ticket"); ?>"><span class="dashicons dashicons-tickets-alt"></span> Ticket kaufen</button></a>
<!-- <button class="mb-10 w-full btn-black btn "><span class="dashicons dashicons-calendar"></span> Kalendereintrag</a></button> -->
<p class=" text-lg font-light leading-snug">
<?php
the_field('event-description');
?>
</p>
</div>
</div>
</div>
<div class="md:max-w-80">
<?php the_content(); ?>
<?php
// the_post_thumbnail();
wp_link_pages(
array(
'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'tailpress' ) . '</span>',
'after' => '</div>',
'link_before' => '<span>',
'link_after' => '</span>',
'pagelink' => '<span class="screen-reader-text">' . __( 'Page', 'tailpress' ) . ' </span>%',
'separator' => '<span class="screen-reader-text">, </span>',
)
);
?>
</div>
</div>
</div>
<?php
get_footer();
?>