-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsingle.php
96 lines (91 loc) · 3.41 KB
/
single.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<?php get_header(); ?>
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- articles top -->
<ins class="adsbygoogle"
style="display:block"
data-ad-client="ca-pub-7675064447281678"
data-ad-slot="6463898700"
data-full-width-responsive="true"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<?php while (have_posts()) : the_post(); ?>
<main>
<article>
<h1 class="post-title"><?php the_title(); ?></h1>
<?php the_post_thumbnail('medium'); ?>
<aside class="col">
<div class="fundraising-info col">
<h5 class="fundraising-backers">
<?php get_template_part('fundraising-backers'); ?>
</h5>
<?php get_template_part('fundraising-progress'); ?>
<h2 class="fundraising-amount">
<?php get_template_part('fundraising-amount'); ?>
</h2>
</div>
<?php
$menu_items = get_menu_items_by_registered_slug('donate-button');
if ($menu_items && count($menu_items)) : ?>
<?php $menu_item = $menu_items[0]; ?>
<a class="theme-button" href="<?php echo $menu_item->url ?>">Donate now</a>
<?php endif; ?>
<?php get_template_part('socials'); ?>
<?php if(check_rewards_exist()): ?>
<div class="rewards-aside">
<h1> Rewards </h1>
<?php get_template_part('rewards'); ?>
</div>
<?php endif; ?>
</aside>
<div class="post-content">
<!-- tabs only show on mobile if rewards present-->
<?php if(check_rewards_exist()): ?>
<div class="mobile-content-tabs">
<div class="mobile-content-tab selected" onclick='onMobileContentTabClicked(event)' show="content-main-wrapper">
Campaign
</div>
<div class="mobile-content-tab" onclick='onMobileContentTabClicked(event)' show="rewards-main-wrapper">
Rewards
</div>
</div>
<?php endif; ?>
<div id="content-main-wrapper" >
<?php the_content(); ?>
</div>
<div id="rewards-main-wrapper" hidden>
<?php get_template_part('rewards'); ?>
</div>
<div class="author">
<?php
if (function_exists('coauthors_posts_links')) {
echo 'Author: ' . coauthors_posts_links(null, null, null, null, false);
} else {
echo 'Author: ' . get_the_author_posts_link();
} ?>
<br>
<?php if (function_exists('get_coauthors')) {
$coauthors = get_coauthors();
foreach ($coauthors as $coauthor) {
?>
<a href=<?php echo $coauthor->website ?? $coauthor->user_url ?>> <?php echo $coauthor->description ?> </a>
<?php
}
}
?>
</div>
</div>
</article>
</main>
<?php endwhile; ?>
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- articles bottom -->
<ins class="adsbygoogle"
style="display:block"
data-ad-client="ca-pub-7675064447281678"
data-ad-slot="8944568293"
data-full-width-responsive="true"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<?php get_footer(); ?>