-
Notifications
You must be signed in to change notification settings - Fork 0
/
page-projets.php
57 lines (44 loc) · 1.08 KB
/
page-projets.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
<?php/*
Template Name: Projets
*/?>
<?php acf_form_head();?>
<?php
get_header();
?>
<?php if(have_posts()): ?>
<?php while(have_posts()): the_post(); ?>
<section class="hi">
<div class="text">
<h2 title="projets" role="heading" aria-level="2">
<?php the_title() ?>
</h2>
<p><?php the_content() ?></p>
</div>
</section>
<?php endwhile; ?>
<?php endif; ?>
<section class="projets">
<h2 class="hidden">Projets</h2>
<?php
// the query
$the_query = new WP_Query( 'post_type=projets' ); ?>
<?php if ( $the_query->have_posts() ) : ?>
<!-- pagination here -->
<!-- the loop -->
<?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
<article>
<a href="<?php the_permalink(); ?>">Détails sur ce projet</a>
<h3><?php the_title(); ?></h3>
<p><?php the_content(); ?></p>
</article>
<?php endwhile; ?>
<!-- end of the loop -->
<!-- pagination here -->
<?php wp_reset_postdata(); ?>
<?php else: ?>
<p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p>
<?php endif; ?>
</section>
<?php
get_footer();
?>