-
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathpage-data.php
More file actions
executable file
·81 lines (69 loc) · 1.71 KB
/
page-data.php
File metadata and controls
executable file
·81 lines (69 loc) · 1.71 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<?php
/**
* Template Name: Data 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">
<div class="page-intro">
<?php get_template_part( 'template-parts/page/page', 'intro' ); ?>
</div>
</div>
<?php
}
?>
<?php
get_template_part( 'template-parts/page/page', 'stats-featured' );
get_template_part( 'template-parts/page/page', 'stats-graph' );
get_template_part( 'template-parts/page/page', 'stats-plain' );
get_template_part( 'template-parts/page/page', 'stats-profiles' );
?>
<div class="alignwide flex flex-medium data-template toc__section">
<div class="w-32p toc__sidebar">
<?php get_sidebar( 'list' ); ?>
</div>
<div class="w-68p toc__content">
<div class="list-container">
<?php get_template_part( 'template-parts/page/page', 'list' ); ?>
</div>
</div>
</div>
<?php
$modules = array(
'social',
'cta',
'facts',
'connect',
'profiles',
'listings',
'featured-posts',
'projects',
'offsite-links',
'support',
);
foreach ( $modules as $module ) {
get_template_part( 'template-parts/page/page', $module );
}
?>
<?php
}
get_footer();