Skip to content

Commit e31603b

Browse files
authored
Merge pull request #14 from OpenSourceOrg/add/9-last-modified-date
Add last modified date in the header
2 parents e7cc029 + b60d001 commit e31603b

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

themes/osi/inc/template-functions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ function osi_press_mentions_by_publication_date( $query ) {
209209
*/
210210

211211
function osi_the_page_dates() {
212-
if ( ! is_home() && ! is_front_page() ) {
212+
if ( is_page() && ! is_home() && ! is_front_page() ) {
213213
$max_date = '2023-02-01'; // February 1, 2023
214214
$created = get_the_date( 'F j, Y' );
215215
$modified = get_the_modified_date( 'F j, Y' );

themes/osi/template-parts/content-page.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,4 @@
1515
<?php the_content(); ?>
1616
</div><!-- .entry-content -->
1717

18-
<?php osi_the_page_dates(); ?>
19-
2018
</article><!-- #post-<?php the_ID(); ?> -->

themes/osi/template-parts/header-featured-image.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
}
1010
}
1111

12-
if( ! isset( $page_title ) ) {
12+
if ( ! isset( $page_title ) ) {
1313
$page_title = get_the_title();
1414
}
1515

@@ -28,6 +28,7 @@
2828
<div class="wp-block-cover alignfull has-neutral-dark-background-color has-background-dim-100 has-background-dim">
2929
<div class="wp-block-cover__inner-container">
3030
<?php echo ( ! empty( $page_title ) ) ? '<h1 class="entry-title page--title">' . esc_html( $page_title ) . '</h1>' : ''; ?>
31+
<?php osi_the_page_dates(); ?>
3132
</div>
3233
</div>
3334
</header>

0 commit comments

Comments
 (0)