-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhome.php
114 lines (97 loc) · 3.88 KB
/
home.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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<?php
/*
Template Name: Home
*/
?>
<?php get_header();?>
<?php
//$page=get_page_by_path('challenge-details');
$homeBannerText = get_post_meta($post->ID, "Challenge Banner Text", true);
$bannerImage = get_post_meta($post->ID, "Banner Image", true);
$bannerImageValue = wp_get_attachment_image_src( $bannerImage,"full");
$bannerImageValue = $bannerImageValue[0];
$YoutubeID = get_post_meta($post->ID, "Video YouTube ID", true);
$videoTitle = get_post_meta($post->ID, "Video Title", true);
$jsvideo = ( $YoutubeID == '' ) ?"alert('Video is coming soon')":"popupYT('".$YoutubeID."','".$videoTitle."')";
$box1Icon = get_post_meta($post->ID, "Box 1 Icon", true);
$box1IconImg = wp_get_attachment_image_src( $box1Icon);
$box1IconImg = $box1IconImg[0];
$box1Title = get_post_meta($post->ID, "Box 1 Title", true);
$box1Text = get_post_meta($post->ID, "Box 1 Text", true);
$box2Icon = get_post_meta($post->ID, "Box 2 Icon", true);
$box2IconImg = wp_get_attachment_image_src( $box2Icon);
$box2IconImg = $box2IconImg[0];
$box2Title = get_post_meta($post->ID, "Box 2 Title", true);
$box2Text = get_post_meta($post->ID, "Box 2 Text", true);
$box3Icon = get_post_meta($post->ID, "Box 3 Icon", true);
$box3IconImg = wp_get_attachment_image_src( $box3Icon);
$box3IconImg = $box3IconImg[0];
$box3Title = get_post_meta($post->ID, "Box 3 Title", true);
$box3Text = get_post_meta($post->ID, "Box 3 Text", true);
$box4Icon = get_post_meta($post->ID, "Box 4 Icon", true);
$box4IconImg = wp_get_attachment_image_src( $box4Icon);
$box4IconImg = $box4IconImg[0];
$box4Title = get_post_meta($post->ID, "Box 4 Title", true);
$box4Text = get_post_meta($post->ID, "Box 4 Text", true);
?>
<!-- Content Wrapper -->
<div id="homePage">
<div id="contentWrapper">
<div id="homeBanner" style="background-image:url('<?php echo $bannerImageValue;?>');">
<div class="introContent">
<?php if($homeBannerText != null) :
echo apply_filters('the_content', $homeBannerText);
endif;?>
<ul class="info">
<li class="first">
<h5>
<?php if($box1IconImg != null) {?>
<img src="<?php echo $box1IconImg;?>" alt="" />
<?php } ;?>
<?php if($box1Title != null) : echo apply_filters('the_content', $box1Title); endif;?>
</h5>
<a class="btnWatch" href="javascript:;" onclick="<?php echo $jsvideo;?>"></a>
<p>
<?php if($box1Text != null) : echo apply_filters('the_content', $box1Text); endif;?>
</p>
</li>
<li>
<h5>
<?php if($box2IconImg != null) {?>
<img src="<?php echo $box2IconImg;?>" alt="" />
<?php } ;?>
<?php if($box2Title != null) : echo apply_filters('the_content', $box2Title); endif;?>
</h5>
<p>
<?php if($box2Text != null) : echo apply_filters('the_content', $box2Text); endif;?>
</p>
</li>
<li>
<h5>
<?php if($box3IconImg != null) {?>
<img src="<?php echo $box3IconImg;?>" alt="" />
<?php } ;?>
<?php if($box3Title != null) : echo apply_filters('the_content', $box3Title); endif;?>
</h5>
<p>
<?php if($box3Text != null) : echo apply_filters('the_content', $box3Text); endif;?>
</p>
</li>
<li>
<h5>
<?php if($box4IconImg != null) {?>
<img src="<?php echo $box4IconImg;?>" alt="" />
<?php } ;?>
<?php if($box4Title != null) : echo apply_filters('the_content', $box4Title); endif;?>
</h5>
<p>
<?php if($box4Text != null) : echo apply_filters('the_content', $box4Text); endif;?>
</p>
</li>
</ul>
<div class="clear"></div>
</div>
</div>
</div>
</div>
<?php get_footer(); ?>