-
Notifications
You must be signed in to change notification settings - Fork 0
/
single-cww_event.php
executable file
·40 lines (38 loc) · 1.21 KB
/
single-cww_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
<?php
$event_id = $post->ID;
$event_is_over = cww_event_is_over( $event_id );
$after_post_id = get_post_meta($post->ID, 'cww_event_after_post_id', true);
if ( $after_post_id && $event_is_over )
$post = get_post($after_post_id);
$layout = get_post_meta($post->ID, '_layout', true);
if (empty($layout) || $layout == 'default'){
$layout=theme_get_option('general','layout');
}
?>
<?php get_header(); ?>
<?php theme_generator('introduce',$post->ID);?>
<div id="page">
<div class="inner <?php if($layout=='right'):?>right_sidebar<?php endif;?><?php if($layout=='left'):?>left_sidebar<?php endif;?>">
<div id="main">
<?php theme_generator('breadcrumbs',$post->ID);?>
<?php
if ( $after_post_id && $event_is_over )
query_posts( "p=$after_post_id" );
if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
<div class="content">
<?php
cww_event_content( $event_id );
?>
<div class="clearboth"></div>
</div><!-- end #content !-->
<?php endwhile; ?>
<div class="clearboth"></div>
</div><!-- end #main !-->
<?php if($layout != 'full') {
get_sidebar();
}?>
<div class="clearboth"></div>
</div><!-- end #.inner etc !-->
<div id="page_bottom"></div>
</div><!-- end #page !-->
<?php get_footer(); ?>