-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcasestudy-index.php
88 lines (77 loc) · 3.09 KB
/
casestudy-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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<?php
/**
* Template Name: Case Study Index Template
*
* Description: Custom template that displays a table of contents type structure of all chapters
*/
get_header();
?>
<div id="primary" class="content-area">
<main id="main" class="site-main">
<?php while ( have_posts() ): the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="page-links">
<a href="<?php the_permalink($post->post_parent); ?>"><em><?php the_field('chapter_title', $post->post_parent) ?></em></a> | <a href="<?php the_permalink($post->post_parent); ?>essays">Essays</a> • <a href="<?php the_permalink($post->post_parent); ?>case-studies">Case Studies</a>
</div>
<header class="entry-header">
<div class="entry-header-wrapper">
<!-- <div class="entry-header-topper"><?php the_title() ?></div> -->
<h1 class="entry-title"><?php echo get_the_title( $post->post_parent ); ?>: Case Studies</h1>
<!-- <div class="entry-author"><?php the_field('chapter_author') ?></div> -->
</div>
</header><!-- .entry-header -->
<?php $query = new WP_Query(array(
'post_type' => 'page',
'post_parent' => $post->ID,
'order' => 'ASC',
'orderby' => 'menu_order'
)); ?>
<?php if ( $query->have_posts() ) : ?>
<div class="entry-content">
<div>
<ul style="list-style: none; margin: 0; padding: 0; text-align: center;">
<?php while ( $query->have_posts() ) : $query->the_post(); ?>
<li><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></li>
<?php endwhile; ?>
</ul>
</div>
</div>
<?php endif; ?>
<?php wp_reset_query(); ?>
<?php
//the_content();
?>
<!--
<div class="page-links">
<a href="<?php the_permalink(); ?>"><em><?php the_field('chapter_title') ?></em></a> | <a href="essays">Essays</a> • <a href="case-studies">Case Studies</a>
</div>
-->
<?php if ( get_edit_post_link() ) : ?>
<footer class="entry-footer">
<?php
edit_post_link(
sprintf(
wp_kses(
/* translators: %s: Name of current post. Only visible to screen readers */
__( 'Edit <span class="screen-reader-text">%s</span>', 'rula_imprinting_canada' ),
array(
'span' => array(
'class' => array(),
),
)
),
get_the_title()
),
'<span class="edit-link">',
'</span>'
);
?>
</footer><!-- .entry-footer -->
<?php endif; ?>
</article>
<?php endwhile; ?>
</main><!-- #main -->
</div><!-- #primary -->
<?php
get_sidebar();
get_footer();