-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtemplate-evenement.php
More file actions
36 lines (32 loc) · 1.15 KB
/
template-evenement.php
File metadata and controls
36 lines (32 loc) · 1.15 KB
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
<!-- Ajout du fichier template-evenement.php -->
<?php
/**
* Template Name: Événements
*
* @package WordPress
* @subpackage cidw_4w4
*/
get_header();
?>
<main class="site__main" style="background-color: <?php the_field('couleur'); ?>;">
<section class="evenement">
<!-- <h1>---- template-evenement.php ------</h1> -->
<?php if (have_posts()): the_post(); ?>
<h1 class="evenement__titre"><?php the_title() ?></h1>
<div class="evenement__contenu">
<?php $image = get_field('image'); ?>
<?php if( !empty( $image ) ): ?>
<img src="<?php echo esc_url($image['url']); ?>" alt="<?php echo esc_attr($image['alt']); ?>" />
<?php endif; ?>
<div class="evenement__texte">
<p class='evenement__resume'><?php the_field('resume'); ?></p>
<p class='evenement__endroit'>Lieu: <?php the_field('endroit'); ?></p>
<p>Organisé par: <?php the_field('organisateur'); ?></p>
<p>Date: <?php the_field('date'); ?></p>
<p>Heure: <?php the_field('heure'); ?></p>
</div>
</div>
<?php endif ?>
</section>
</main>
<?php get_footer(); ?>