forked from jeffstacey/swa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
page.php
60 lines (33 loc) · 1.01 KB
/
page.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
<?php
/**
* Description of Template goes here
*
Template Name: Page
*/
?>
<?php get_header(); ?>
<?php
if(have_posts()) : while(have_posts()) : the_post();
$img = get_post_meta(get_the_id(), 'fact_sheet_header', true);
$img = $img ? ' style="background: rgba(255, 255, 255, 0) url(\'' . $img . '.800\') no-repeat center;"' : '';
$pdf_url = get_post_meta(get_the_id(), 'fact_sheet_pdf', true);
?>
<div id="intro" <?php post_class(); ?>>
<?php if ($pdf_url) { ?>
<div class="floatright">
<a href="<?php echo $pdf_url; ?>" target="_blank">Print version [PDF]</a>
</div>
<?php } ?>
<header <?php echo $img; ?> class="fact-header"><h1><?php the_title(); ?></h1></header>
<?php the_content(); ?>
</div>
<?php get_template_part('part.generatePDF'); ?>
<?php if (wp_get_object_terms($post->ID, 'feature')): ?>
<div class="utilities">
<div class="print-feature"></div>
</div>
<?php endif ?>
</div>
<?php endwhile; endif; ?>
<?php get_sidebar() ?>
<?php get_footer(); ?>