-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathpage-list.php
More file actions
61 lines (51 loc) · 1.29 KB
/
Copy pathpage-list.php
File metadata and controls
61 lines (51 loc) · 1.29 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
<?php
/**
* Template Name: List Page
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package shiro
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // File should never be accessed directly.
}
get_header();
while ( have_posts() ) :
the_post();
// Page Header.
$template_args = array(
'h2_title' => get_the_title(),
'h1_title' => get_post_meta( get_the_ID(), 'sub_title', true ),
);
if ( has_post_thumbnail() ) {
$template_args['image'] = get_the_post_thumbnail_url( get_the_ID(), 'large' );
get_template_part( 'template-parts/header/page-image', null, $template_args );
} else {
get_template_part( 'template-parts/header/page-noimage', null, $template_args );
}
?>
<div class="alignwide flex flex-medium list-template toc__section">
<div class="w-32p toc__sidebar">
<?php get_sidebar( 'list' ); ?>
</div>
<div class="w-68p toc__content">
<div class="page-intro">
<?php get_template_part( 'template-parts/page/page', 'intro' ); ?>
</div>
<?php get_template_part( 'template-parts/page/page', 'list' ); ?>
</div>
</div>
<?php
$modules = array(
'cta',
'related',
'support',
'connect',
);
foreach ( $modules as $module ) {
get_template_part( 'template-parts/page/page', $module );
}
?>
<?php
endwhile;
get_footer();