-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpage-contact.php
61 lines (58 loc) · 2.09 KB
/
page-contact.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
<?php
get_header(); ?>
<main class="main-content">
<div class="container">
<h1>
<?php
$title = carbon_get_theme_option( 'cr_contact_title' );
if ( isset( $title ) && $title !== '' ) {
echo $title;
} else {
echo 'Contact';
}
?>
</h1>
<?php
$content = carbon_get_theme_option( 'cr_contact_content' );
if ( isset( $content ) && $content !== '' ) {
echo apply_filters( 'the_content', $content );
} else {
echo '<p>Vous pouvez m\'envoyer un message en utilisant le formulaire ci-dessous.</p>';
}
echo do_shortcode( '[contact-form-7 id="246" title="contact" html_class="contact-form"]' );
?>
<h2>Les ateliers cuisine "Mes recettes"</h2>
<div class="map">
<?php
$markers = carbon_get_theme_option( 'cr_workshop_markers' );
if ( ! empty( $markers ) ) {
echo do_shortcode( '[leaflet-map scrollwheel doubleClickZoom zoomcontrol detect-retina zoom=6 lat=46.9 lng=2.8]' );
echo do_shortcode( '[leaflet-scale]' );
foreach ( $markers as $marker ) {
echo do_shortcode( '[leaflet-marker address="' .
$marker['cr_workshop_address'] .
'"]' .
$marker['cr_workshop_name'] .
'<br>' .
$marker['cr_workshop_address'] .
'<br><a href="tel:' .
$marker['cr_workshop_tel'] .
'">' .
$marker['cr_workshop_tel'] .
'</a><br><a href="mailto:' .
$marker['cr_workshop_email'] .
'">' .
$marker['cr_workshop_email'] .
'</a><br><a target="_blank" href="' .
$marker['cr_workshop_url'] .
'">' .
$marker['cr_workshop_url'] .
'</a>[/leaflet-marker]' );
}
}
?>
</div>
</div>
</main>
<?php
get_footer(); ?>