-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtemplate-single-campaign.php
57 lines (47 loc) · 1.33 KB
/
template-single-campaign.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
<?php
/**
* Template Name: Single Campaign
*
*/
global $campaign, $post;
$page_name = get_post($post)->post_name;
if ( ! is_object( $campaign ) ) {
$campaign = atcf_get_campaign( $post );
}
$campaign_id = $_GET['campaign_id'];
$classes = '';
$tag_list = wp_get_post_terms($campaign_id, 'download_tag');
foreach ($tag_list as $tag) {
if ($classes != '') { $classes .= ' '; }
$classes .= 'theme-' . $tag->slug;
$client_context = $tag->slug;
}
if ($page_name == ATCF_Campaign::$campaign_status_vote) {
global $disable_logs;
$disable_logs = TRUE;
}
?>
<?php get_header(); ?>
<div id="content" <?php echo 'class="'.$classes.'"'; ?>>
<div class="padder">
<div class="page" id="blog-single" role="main">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="center margin-height">
<?php
switch ($page_name) {
case 'editer-une-actu':
do_shortcode('[yproject_crowdfunding_edit_news]');
break;
default:
the_content();
break;
}
?>
</div>
</div>
<?php endwhile; endif; ?>
</div>
</div><!-- .padder -->
</div><!-- #content -->
<?php get_footer(); ?>