-
Notifications
You must be signed in to change notification settings - Fork 0
/
template-full-width-sponsors-mission-statement.php
69 lines (68 loc) · 2.37 KB
/
template-full-width-sponsors-mission-statement.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
<?php get_header();
/**
* Template Name: Full-width with Sponsors and Mission Statement
*
*
*/
?>
<main class='main main--page'>
<section class='content'>
<?php while( have_posts() ) : the_post(); ?>
<div class='content__title-wrapper'>
<?php the_title( '<h1 class="content__title">', '</h1>' ); ?>
</div>
<div class='content__body-wrapper'>
<div class='content__body'>
<?php the_content(); ?>
</div>
</div>
<?php endwhile; ?>
</section>
<?php
//wp_reset_postdata();
$args = array('post_type' => 'sponsor', 'order' => 'ASC');
$sponsors = new WP_Query( $args );
if ( $sponsors->have_posts() ) :
?>
<section class='sponsors'>
<div class='sponsors__wrapper'>
<ul class='sponsors__item-list'>
<?php while ( $sponsors->have_posts() ) : $sponsors->the_post();
?>
<?php
$featured_img_url = get_the_post_thumbnail_url(get_the_ID(),'full');
$sponsor_url = get_field('link');
$sponsor_name = get_the_title();
include(locate_template('component-sponsors.php'));
?>
<?php endwhile; ?>
</ul>
</div>
<div class='cta-button__wrapper'>
<label role='button' for='contact-form-trigger--sponsor' class='cta-button'>Apply to Be a Sponsor</label>
</div>
<?php get_template_part('component-contact-sponsor'); ?>
</section>
<?php endif; ?>
<?php
wp_reset_postdata();
while( have_posts() ) : the_post(); ?>
<?php
$show_secondary_content = get_field('show_secondary_content');
if ($show_secondary_content) :
?>
<section class='content content--secondary'>
<hr class='hr' />
<div class='content__title-wrapper'>
<?php the_field('secondary_title'); ?>
</div>
<div class='content__body-wrapper'>
<div class='content__body'>
<?php the_field('secondary_content'); ?>
</div>
</div>
</section>
<?php endif; ?>
<?php endwhile; ?>
</main>
<?php get_footer(); ?>