-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsingle-objects.php
164 lines (145 loc) · 5.8 KB
/
single-objects.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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
<?php get_header();?>
<?php
//Declare needed variables
//Get the featured image
if(has_post_thumbnail() ){
$featuredimg = get_the_post_thumbnail_url();
}else{
$featuredimg = 'PATH-TO-DEFAULT-IMG';
}
//Get the genre
if(get_field('movie_genre')){
$genres = get_field('movie_genre');
}
//Get duration field
if(get_field('movie_duration')){
$duration = get_field('movie_duration');
}
//Get rating field
if(get_field('movie_rating')){
$rating = get_field('movie_rating');
}
/*Get movie image field (url)
if(get_field('movie_picture')){
$movie_image = get_field('movie_picture');
}
/*Get release date field
if(get_field('movie_release_date')){
$release_date = get_field('movie_release_date',false, false);
$releaseDate = new DataTime($release_date);
}
*/
//Get country field
if(get_field('movie_country')){
$country = get_field('movie_country');
}
//Get language field
if(get_field('movie_language')){
$language = get_field('movie_language');
}
//Get budget field
if(get_field('movie_budget')){
$budget = get_field('movie_budget');
}
//Get opening_weeked field
if(get_field('opening_weekend_revenenue')){
$opening_weekend_revenenue = get_field('opening_weekend_revenenue');
}
//Get movie trailer
if(get_field('movie_trailer')){
$movie_trailer = get_field('movie_trailer');
}
//Get main character image
if(get_field('cast_image')){
$cast_image = get_field('cast_image');
}
//Get Character Name
if(get_field('character_name')){
$character_name = get_field('character_name');
}
//Get Character Information
if(get_field('character_information')){
$character_information = get_field('character_information');
}
//Get movie plot
if(get_field('movie_plot')){
$movie_plot = get_field('movie_plot');
}
?>
<!--HTML CODE-->
<div id="main" class="main-content clearfix" data-aos="flipt-left" data-aos-duration="1500" data-aos-anchor-placement="top-bottom">
<?php while(have_posts()) : the_post(); ?>
<div class="banner-section clearfix" data-aos="fade-right" data-aos-duration="1500" style="background-image: url(<?php echo $featuredimg; ?>);">
<div class="container">
<div class="col column1 clearfix"></div>
<div class="col column2 clearfix">
<h1 class="post=title"><?php echo get_the_title();?></h1>
<div class="post-details">
<p class="genre">
<?php
foreach($genres as $genre){
echo '<span>'.$genre. '</span>';
}
?><span class="duration"><?php echo ' '.$duration . 'mins';?></span>
</p>
<p class="rating">Rating: <?php echo $rating; ?></p>
</div>
</div>
</div>
</div>
<div class="body-section clearfix" data-aos="zoom-out-up" data-aos-duration="1500" data-aos-anchor-placement="top-bottom">
<div class="container">
<div class="col column3 clearfix">
<div class="movie-image">
<?php if(get_field('movie_picture') ):?>
<img src="<?php the_field('movie_picture');?>"/>
<?php endif; ?>
</div>
<h2>Object info</h2>
<div class="movieinfo">
<!--<p><strong>Release Date:</strong><?php //echo $releaseDate->format('j F Y');?>(<?php echo $country;?>)</p>-->
<p class="genre2"><strong>Genres:</strong>
<?php
foreach($genres as $genre){
echo '<span>'. $genre . '</span>';
}
?>
</p>
<p><strong>Country: </strong><?php echo $country; ?></p>
<p><strong>Language: </strong><?php echo $language; ?></p>
<p><strong>Budget: </strong><?php echo $budget; ?>(estimated)<p>
<p><strong>Opening Weekend: </strong><?php echo $opening_weekend_revenenue;?></p>
</div>
</div>
<div class="col column4 clearfix" data-aos="zoom-out-up" data-aos-duration="1500" data-aos-anchor-placement="top-bottom">
<div class="plot">
<h2>Object Storyline</h2>
<p><?php echo $movie_plot;?></p>
</div>
<div class="trailer" data-aos="zoom-out-up" data-aos-duration="1500" data-aos-anchor-placement="top-bottom">
<h2>Object trailer</h2>
<div class="video-frames">
<?php
$link = get_field('movie_trailer');
echo $link
?>
</div>
</div>
<div class="cast" data-aos="zoom-out-up" data-aos-duration="1500" data-aos-anchor-placement="top-bottom">
<h2>Object cast</h2>
<div class="image-cast">
<?php if(get_field('cast_image') ):?>
<img src="<?php the_field('cast_image');?>"/>
<?php endif; ?>
<div class="infoCharacter">
<p><strong><?php echo $character_name?></strong></p>
<p><?php echo $character_information?></p>
</div>
</div>
</div>
</div>
</div>
</div>
<?php endwhile; ?>
</div>
<?php get_footer();?>