File tree Expand file tree Collapse file tree 3 files changed +24
-0
lines changed Expand file tree Collapse file tree 3 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -2792,6 +2792,9 @@ footer li img {
2792
2792
opacity : 1 ;
2793
2793
}
2794
2794
2795
+ .post-heirarchy {
2796
+ margin-bottom : 0.75em ;
2797
+ }
2795
2798
2796
2799
/* Listing Pages (categories, searches, etc.)
2797
2800
========================================================================== */
Original file line number Diff line number Diff line change @@ -183,3 +183,23 @@ function jq_banner() {
183
183
'jquery_portland_banner_ ' . $ site_color . '.png"> ' .
184
184
'</a> ' ;
185
185
}
186
+
187
+ function jq_post_heirarchy () {
188
+ global $ post ;
189
+ $ current = $ post ;
190
+ $ parents = array ();
191
+ while ( $ current ->post_parent ) {
192
+ $ current = get_post ( $ current ->post_parent );
193
+ $ parents [] = '<a href=" ' . get_permalink ( $ current ->ID ) . '"> ' .
194
+ $ current ->post_title . '</a> ' ;
195
+ }
196
+
197
+ if ( empty ( $ parents ) ) {
198
+ return '' ;
199
+ }
200
+
201
+ return '' .
202
+ '<div class="post-heirarchy"> ' .
203
+ 'Posted in: ' . implode ( ' > ' , array_reverse ( $ parents ) ) .
204
+ '</div> ' ;
205
+ }
Original file line number Diff line number Diff line change 5
5
?>
6
6
7
7
<?php $ next_prev_arr = get_next_prev_post (); ?>
8
+ <?php echo jq_post_heirarchy (); ?>
8
9
<article id="post-<?php the_ID (); ?> " <?php post_class (); ?> >
9
10
<header class="entry-header">
10
11
<h1 class="entry-title"><?php the_title (); ?> </h1>
You can’t perform that action at this time.
0 commit comments