generated from asuengineering/pitchfork-child
-
Notifications
You must be signed in to change notification settings - Fork 0
/
single-reference-guide.php
126 lines (95 loc) · 3 KB
/
single-reference-guide.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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<?php
/**
*
* Single.php template for reference guide posts.
* References guide_tags in place of the standard categories on the default template.
*
* @package pitchfork
*/
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
get_header();
?>
<article id="skip-to-content post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php while ( have_posts() ) {
the_post();
if ( has_post_format('aside') ) {
// Load a post-template.
do_action('qm/debug', 'We will load a template.');
get_template_part( 'format', 'aside' );
} else {
// "Standard" post formatting follows.
?>
<header class="entry-header">
<div class="title-wrap">
<?php the_title( '<h1 class="entry-title article">', '</h1>' ); ?>
</div>
<?php echo get_the_post_thumbnail($post_id, 'full', array( 'class' => 'img-fluid' )); ?>
</header>
<div class="content-wrap">
<?php
/**
* Test if post has an excerpt that's been deliberatly created.
* If not, avoid putting it on the page here because of duplicate content.
* (Default excerpt repeats the first 140 characters of the post.)
*/
if ( has_excerpt() ) {
echo '<section class="excerpt">';
the_excerpt();
echo '</section>';
}
?>
<aside class="secondary">
<div class="sidebar-wrap">
<div class="post-meta">
<div class="attribution">
<?php echo get_avatar( get_the_author_meta( 'ID' ), 80, 'mystery' ); ?>
<div class="entry-byline">
<p>
<?php esc_html_e( 'By ', 'pitchfork' );
pitchfork_posted_by(); ?>
</p>
<p>
<?php pitchfork_posted_originally(); ?>
</p>
</div>
</div>
<?php
// Edtech_tags list as button-tags from the UDS card spec.
$categories = get_the_terms( $post->ID ,'guide-tag');
$categorylist = '';
if ( ! empty( $categories ) ) {
$categorylist = '<ul class="category-list">';
foreach( $categories as $category ) {
$categorylist .= '<li><a class="btn btn-tag btn-tag-alt-white" href="' . esc_url( get_term_link( $category->term_id ) ) . '">' . esc_html( $category->name ) . '</a></li>';
}
$categorylist .= '</ul>';
}
echo $categorylist;
?>
<?php
/**
* Social share intent icons.
* @since v2.1 - Provides preferred support for AddToAny in this sidebar location.
* AddToAny mirrors service used by ASU News.
*/
if ( function_exists( 'ADDTOANY_SHARE_SAVE_KIT' ) ) {
ADDTOANY_SHARE_SAVE_KIT();
}
?>
</div>
</div>
</aside>
<section class="content">
<?php the_content(); ?>
</section>
<footer class="entry-footer default-max-width">
<?php
// The default single tempalte output the tag list in this space under post content.
?>
</footer>
<?php // Comments template would go here.
} // end post_format = standard check.
} // end while_have_posts
echo '</article>';
get_footer();