-
Notifications
You must be signed in to change notification settings - Fork 0
/
homepage_NEW.php
131 lines (101 loc) · 4.16 KB
/
homepage_NEW.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
<?php /* Template Name: Homepage_NEW */ ?>
<?php get_header(); ?>
<a href="#whatismoabi" class="scroll fa fa-angle-down arrow" id="whatismoabi"></a>
<div class="header" >
<div class="row" >
<div class="large-12 columns text-center">
<h1 class="animated fadeInDown" id="intro"><?php the_field('main_title'); ?></h1>
<h2 class="animated fadeInDown"><?php the_field('main_subline'); ?></h2>
<a href="/about"><button class="animated fadeInDown"> Learn More</button></a>
</div>
</div>
</div>
<div class="dark" >
<div class="row wp1">
<h1><?php the_field('second_main'); ?></h1>
<p class="headline"><?php the_field('second_p'); ?></p>
</div>
</div>
</div>
<div class="content">
<div class="row text-center wp2">
<h1>Projects</h1>
<p class="headline">Moabi has worked on a diverse range of projects with both local and international partners. Below are short overviews of our most recent projects. If you’d like to work with us on your project, <a href="mailto:[email protected]">get in touch!</a> </p>
</div>
</div>
<div class="work">
<?php
if ( get_query_var('paged') ) $paged = get_query_var('paged');
if ( get_query_var('page') ) $paged = get_query_var('page');
$query = new WP_Query( array( 'post_type' => 'portfolio', 'paged' => $paged, 'posts_per_page' => 3 ) );
if ( $query->have_posts() ) : ?>
<?php while ( $query->have_posts() ) : $query->the_post(); ?>
<figure class="large-4 columns" style="background: url('<?php the_field('project_logo'); ?>');background-size: cover;background-position:center;height:550px">
<a href="<?php the_permalink() ?>"><figcaption>
<h3>'<?php the_field('project_excerpt'); ?></h3>
</figcaption></a>
<?php the_content(); ?>
</figure>
<?php endwhile; wp_reset_postdata(); ?>
<?php else : ?>
<?php endif; ?>
</div>
<div class="content">
<div class="row text-center wp2">
<a href="/portfolio"><button>View More</button></a>
</div>
</div>
<div class="grey content">
<div class="row text-center wp2">
<h1>Moabi in Action</h1>
<p class="headline">Read about how we have applied our technology<br> and approaches on the ground.</p>
</div>
</div>
<div class="action">
<?php
if ( get_query_var('paged') ) $paged = get_query_var('paged');
if ( get_query_var('page') ) $paged = get_query_var('page');
$query = new WP_Query( array( 'post_type' => 'reports', 'paged' => $paged, 'posts_per_page' => 4 ) );
if ( $query->have_posts() ) : ?>
<?php while ( $query->have_posts() ) : $query->the_post(); ?>
<?php $url = wp_get_attachment_url( get_post_thumbnail_id($post->ID, 'thumbnail') ); ?>
<figure class="large-6 columns featr" style="background: url('<?php echo $url ?>');background-size: cover;background-position:bottom">
<a href="<?php the_permalink() ?>"><figcaption>
<h3><?php the_title(); ?></h3>
<p class="headline"><?php the_excerpt(); ?></p>
</figcaption></a>
</figure>
<?php endwhile; wp_reset_postdata(); ?>
<?php else : ?>
<?php endif; ?>
</div>
<div class="grey content">
<div class="row text-center wp2">
<a href="/reports"><button>View More</button></a>
</div>
</div>
<div class="content">
<div class="row text-center wp2">
<h1>News</h1>
<p class="headline">Moabi has worked on a diverse range of projects<br> with both local and international partners. </p>
</div>
</div>
<div class="news">
<?php query_posts('cat=1&posts_per_page=3'); if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="large-4 columns">
<a href="<?php the_permalink() ?>">
<section>
<h3><?php the_title(); ?></h3>
<span><p><?php the_time('F jS, Y') ?></p></span>
<p><?php the_excerpt(); ?></p>
</section>
</a>
</div>
<?php endwhile; else: ?>
<p>Sorry, no posts to list</p>
<?php endif; ?>
<div class="large-12 columns text-center" style="padding-top:60px;">
<a href="/news"><button>View More</button></a>
</div>
</div>
<?php get_footer(); ?>