forked from Amunds/kvarteret_theme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sidebar.php
executable file
·72 lines (62 loc) · 2.16 KB
/
sidebar.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
<?php
/**
* The Sidebar containing the primary and secondary widget areas.
*
* @package WordPress
* @subpackage kvarteret
* @since Kvarteret 1.0
*/
?>
<?php if(is_front_page()) : ?>
<div class="right widget four_cols" role="complementary">
<?php // Get next Helhus
$dew_options = DEW_Management::getOptions();
$client = new eventsCalendarClient ($dew_options['eventServerUrl'], null, $dew_options['cache'], $dew_options['cacheTime']);
$festivalSearch = $client->festivalList(array('titleContains' => 'helhus', 'limit' => 1));
if (!empty($festivalSearch->data[0]->id)) {
$helhus = $festivalSearch->data[0];
print_r($festivalSearch);
?>
<a href="<?php echo $helhus->url; ?>" class="large bebas helhus">Neste Helhus<br /><small><?php echo date("D, d M Y", strtotime($helhus->startDate)); ?> CC: <?php echo $helhus->covercharge; ?></small></a>
<?php } // startDate, covercharge, url
?>
<ul class="widget_ul">
<?php dynamic_sidebar( 'frontpage' ); ?>
</ul>
</div>
<?php endif; ?>
<?php if(is_page('arrangere') || in_array(499, get_post_ancestors($post))) : ?>
<div class="right widget four_cols" role="complementary">
<ul class="widget_ul">
<?php dynamic_sidebar( 'arrangere' ); ?>
</ul>
</div>
<?php endif; ?>
<?php if(is_page('bli-med') || in_array(13, get_post_ancestors($post))) : ?>
<div class="right widget four_cols" role="complementary">
<ul class="widget_ul">
<?php dynamic_sidebar( 'bli-med' ); ?>
</ul>
</div>
<?php endif; ?>
<?php if(is_page('samarbeidspartnere') || in_array(15, get_post_ancestors($post))) : ?>
<div class="right widget four_cols" role="complementary">
<ul class="widget_ul">
<?php dynamic_sidebar( 'samarbeidspartnere' ); ?>
</ul>
</div>
<?php endif; ?>
<?php if(is_page('om-kvarteret') || in_array(19, get_post_ancestors($post))) : ?>
<div class="right widget four_cols" role="complementary">
<ul class="widget_ul">
<?php dynamic_sidebar( 'samarbeidspartnere' ); ?>
</ul>
</div>
<?php endif; ?>
<?php if(is_page('program')) : ?>
<div class="right widget four_cols" role="complementary">
<ul class="widget_ul">
<?php dynamic_sidebar( 'program' ); ?>
</ul>
</div>
<?php endif; ?>