forked from Teplitsa/kandinsky
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsingle-leyka_campaign.php
64 lines (51 loc) · 1.82 KB
/
single-leyka_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
58
59
60
61
62
63
64
<?php
/**
* Campaign page
*
* @package Kandinsky
*/
$cpost = get_queried_object();
$age = get_post_meta( $cpost->ID, 'campaign_age', true );
if ( ! empty( $age ) ) {
$age = ', ' . $age;
}
$is_finished = get_post_meta( $cpost->ID, 'is_finished', true );
get_header();
?>
<article class="main-content leyka-campaign">
<div class="container">
<div class="entry-header-single container-text">
<?php if ( get_theme_mod( 'campaign_link_above_title', true ) ) { ?>
<div class="entry-meta">
<?php if ( $is_finished ) { ?>
<a href="<?php echo site_url( '/campaign/completed/' ); ?>" class="entry-link">
<?php echo esc_html( get_theme_mod( 'knd_completed_campaigns_archive_title', __( 'They alredy got help', 'knd' ) ) ); ?>
</a>
<?php } else { ?>
<a href="<?php echo site_url( '/campaign/active/' ); ?>" class="entry-link">
<?php echo esc_html( get_theme_mod( 'knd_active_campaigns_archive_title', __( 'They need help', 'knd' ) ) ); ?>
</a>
<?php } ?>
</div>
<?php } ?>
<?php the_title( '<h1 class="entry-title">', $age . '</h1>' ); ?>
</div>
<main class="container-text">
<div class="campaign-form entry-content the-content">
<?php the_content(); ?>
</div>
<?php if ( get_theme_mod( 'campaign_links_after_content', true ) ) { ?>
<div class="related-campaigns">
<a href="<?php echo site_url( '/campaign/active/' ); ?>" class="entry-link">
<?php echo esc_html( get_theme_mod( 'knd_active_campaigns_archive_title', __( 'They need help', 'knd' ) ) ); ?>
</a>
<a href="<?php echo site_url( '/campaign/completed/' ); ?>" class="entry-link">
<?php echo esc_html( get_theme_mod( 'knd_completed_campaigns_archive_title', __( 'They alredy got help', 'knd' ) ) ); ?>
</a>
</div>
<?php } ?>
</main>
</div>
</article>
<?php
get_footer();