-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsingle-events.php
60 lines (51 loc) · 1.84 KB
/
single-events.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
<?php
/**
* The template for displaying all single posts and attachments
*
* @package FoundationPress
* @since FoundationPress 1.0.0
*/
get_header(); ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php
$show_map = get_field('show_map');
$map_obj = get_field('event_location');
$s_where = get_field('event_location_name');
$s_event_date = get_field('event_start_date');
$local_date = date_i18n("d M Y", strtotime($s_event_date));
// var_dump($local_date);
?>
<article id="post-<?php the_ID(); ?>" <?php post_class('events article'); ?>>
<div class="grid-container section--margin-bottom">
<div class="article__header">
<p class="grid-x large-4 large-offset-2 text--date text-color--black-40 no-margin-bottom"><?php echo $local_date; ?></p>
<h2 class="grid-x large-10 large-offset-1 no-margin-top-bottom"><?php the_title(); ?></h2>
<h3 class="grid-x large-4 large-offset-2 no-margin-top"><?php echo $s_where; ?></h3>
</div>
<div class="grid-x article__content">
<?php the_content(); ?>
</div>
</div>
<?php
if(get_field('add_second_c2a')):
$a_c2a_2nd = array(
'intro_title' => get_field('intro_title_inner-2'),
'intro_text' => get_field('intro_text_inner-2'),
'c2a_title' => get_field('c2a_title-2'),
'c2a_text' => get_field('c2a_text-2'),
'c2a_cool_mask' => get_field('c2a_cool_mask-2'),
'c2a_image' => get_field('c2a_image-2'),
'c2a_action' => get_field('c2a_action-2'),
'c2a_bg_color' => get_field('c2a_bg_color-2')
);
svef_partial("library/svef-partials/component-c2a", $a_c2a_2nd);
endif;
$a_image_slider = array(
'show_slider' => get_field('show_slider'),
'image_gallery' => get_field('image_gallery')
);
svef_partial("library/svef-partials/component-imagegallery", $a_image_slider);
?>
</article>
<?php endwhile; ?>
<?php get_footer();