-
Notifications
You must be signed in to change notification settings - Fork 3
/
page-partners.php
76 lines (67 loc) · 1.96 KB
/
page-partners.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
<?php
/*
* Template name: Partnerzy
*/
?>
<?php get_header() ?>
<?php $src = get_template_directory_uri(); ?>
<?php get_template_part('breadcrumbs'); ?>
<?php if (have_posts()): ?>
<?php while (have_posts()): the_post(); ?>
<div class="row">
<div class="small-12 columns">
<h1 class="page-title"><?php the_title(); ?></h1>
</div>
</div>
<div class="row mt25">
<div class="small-12 medium-9 columns">
<?php
$lists = get_field('lists');
if ($lists):
foreach ($lists as $list):
?>
<h2 class="subtitle2 mb20"><span><?php echo $list['header']; ?></span></h2>
<?php
$posts = $list['partners'];
if ($posts):
foreach ($posts as $post):
setup_postdata($post);
$logo = get_field('logo');
$url = get_field('url');
$content = get_the_content();
?>
<div class="partner-box">
<?php if ($url): ?>
<div class="text-center">
<a href="<?php echo $url; ?>"><img src="<?php echo $logo['sizes']['medium']; ?>" alt="<?php the_title(); ?>" /></a>
</div>
<?php if (empty($content)): ?>
<h3><a href="<?php echo $url; ?>"><?php the_title(); ?></a></h3>
<?php endif; ?>
<?php else: ?>
<div class="text-center">
<img src="<?php echo $logo['sizes']['medium']; ?>" />
</div>
<?php if (empty($content)): ?>
<h3><?php the_title(); ?></h3>
<?php endif; ?>
<?php endif; ?>
<div class="content pt15">
<?php the_content(); ?>
</div>
</div>
<?php
endforeach;
wp_reset_postdata();
?>
<?php endif; ?>
<?php endforeach; ?>
<?php endif; ?>
</div>
<div class="small-12 medium-3 columns">
<?php get_template_part('sidebar'); ?>
</div>
</div>
<?php endwhile; ?>
<?php endif; ?>
<?php get_footer() ?>