-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathhome-content-main.php
52 lines (30 loc) · 1.38 KB
/
home-content-main.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
<?php
$args = array(
'post_type' => 'homepage_content',
'posts_per_page' => 1 );
$my_query = new WP_Query( $args );
while ( $my_query->have_posts() ) : $my_query->the_post(); ?>
<div class="homepage-main-wrap" id="main-content">
<div class="block-wrap clearfix">
<div class="homepage-main-block">
<h2 class="first-title"><?php the_title(); ?></h2>
<?php if (get_field('sub_header') ) { ?>
<p><span><?php the_field('sub_header'); ?></span></p>
<?php } ?>
</div> <!-- end .homepage-main-block -->
<?php /** BOX */ ?>
<div class="bottom-boxes">
<?php if(get_field('box_repeater')): ?>
<?php while(has_sub_field('box_repeater')): ?>
<div class="<?php the_sub_field('box_class'); ?> block">
<h3><?php the_sub_field('box_header'); ?></h3>
<?php the_sub_field('box_text'); ?>
<a class="cta-btn" href="<?php the_sub_field('box_url'); ?>"><?php the_sub_field('box_button'); ?></a>
</div>
<?php endwhile; ?>
<?php endif; ?>
</div><!-- end .bottom-boxes -->
</div><!-- end .block-wrap -->
</div> <!-- .end .homepage-main-wrap -->
<?php endwhile; ?>
<?php wp_reset_postdata(); ?>