-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpage-glossary.php
More file actions
62 lines (40 loc) · 1.25 KB
/
page-glossary.php
File metadata and controls
62 lines (40 loc) · 1.25 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
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
62
<?php
/**
* Template Name: Glossary Page
*
* @package Sandbox
*
*/
get_header();
?>
<main id="primary" class="site-main">
<div class="sandbox-main-container">
<h1><?php the_title(); ?></h1>
<div><?php the_content(); ?> </div>
<div class="sandbox-faqs-wrapper">
<?php
$sandbox_row_number = 0;
if( have_rows('sandbox_glossary_item') ):
while( have_rows('sandbox_glossary_item') ) : the_row();
$sbox_question_general = get_sub_field('glossary_word');
$sbox_answer_general = get_sub_field('glossary_definition');
$sandbox_row_number++;
?>
<div class="sandbox-faq-card">
<details>
<summary><span> <?php echo sprintf('%03d', $sandbox_row_number); ?> </span><h3><?php echo $sbox_question_general; ?> </h3></summary>
<p><?php echo $sbox_answer_general; ?> </p>
</details>
</div>
<?php
endwhile;
else :
?>
<h3>No items were found.</h3>
<?php
endif;
?>
</div>
</div>
</main><!-- #main -->
<?php get_footer(); ?>