-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.php
60 lines (55 loc) · 1.81 KB
/
index.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
<?php
get_header();
$address = carbon_get_theme_option( 'address' );
$directions = carbon_get_theme_option( 'address_directions' );
$phone = carbon_get_theme_option( 'phone' );
$email = carbon_get_theme_option( 'email' );
$newsletter_form = carbon_get_theme_option( 'newsletter_form' );
$socials = carbon_get_theme_option( 'socials' );
?>
<main class="site-main">
<?php
if ( have_posts() ) :
while ( have_posts() ) :
the_post();
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="container">
<address>
<?php echo wp_kses_post( $address ); ?>
<a href="<?php echo esc_url( $directions ); ?>" target="_blank">
<?php esc_html_e( 'See Map', 'playground' ); ?>
</a>
<a href="<?php echo esc_url( 'tel:' . $phone ); ?>">
<?php echo esc_html( $phone ); ?>
</a>
<a href="<?php echo esc_url( 'mailto:' . $email ); ?>">
<?php echo esc_html( $email ); ?>
</a>
</address>
<div>
<?php echo do_shortcode( '[contact-form-7 id="' . esc_attr( $newsletter_form ) . '"]' ); ?>
</div>
<ul>
<?php
foreach ( $socials as $social ) :
//https://github.com/WordPress/WordPress-Coding-Standards/issues/1029
/* translators: %s: social channel */
$title = sprintf( __( 'Find us on %s', 'playground' ), $social['social_title'] );
?>
<li>
<a href="<?php echo esc_url( $social['social_url'] ); ?>" aria-label="<?php echo esc_attr( $title ); ?>" title="<?php echo esc_attr( $title ); ?>" target="_blank">
<i class="<?php echo esc_attr( $social['social_icon'] ); ?>" aria-hidden="true"></i>
</a>
</li>
<?php endforeach; ?>
</ul>
</div>
</article>
<?php
endwhile;
endif;
?>
</main>
<?php
get_footer();