Skip to content

Commit

Permalink
added - post single hero and modified date changes from the live server
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveJonesDev committed Jun 3, 2024
1 parent 06a667b commit bd63031
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 deletions.
25 changes: 13 additions & 12 deletions inc/layouts.php
Original file line number Diff line number Diff line change
Expand Up @@ -316,20 +316,20 @@ function eqd_single_fullwidth_content() {
if ( get_field( 'post_format_style' ) !== 'full-width' ) :
?>
<?php
$featured_image = get_the_post_thumbnail_url( get_the_ID() );
$featured_image = false; // This is set to false to prevent output. In the furture if the hero needs output set this equal to: get_the_post_thumbnail_url( get_the_ID() ); phpcs:ignore Squiz.Commenting.InlineComment.InvalidEndChar -- Leaving for future use.
if ( $featured_image ) {
?>
<span class="hero_featured_image">
<?php echo '<img src="' . esc_url( $featured_image ) . '" />'; ?>
<div class="hero_featured_image_data">
<?php
$output = '';
$output .= 'Updated on <time datetime="' . get_the_modified_date( 'Y-m-d' ) . '">' . get_the_modified_date( 'F j, Y' ) . '</time>';
$post_data = get_the_content( get_the_ID() ); // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable -- Leaving for future use.
?>
<?php echo wp_kses_post( $output ); ?>
</div>
</span>
<span class="hero_featured_image">
<?php echo '<img src="' . esc_url( $featured_image ) . '" />'; ?>
<div class="hero_featured_image_data">
<?php
$output = '';
$output .= 'Updated on <time datetime="' . get_the_modified_date( 'Y-m-d' ) . '">' . get_the_modified_date( 'F j, Y' ) . '</time>';
$post_data = get_the_content( get_the_ID() ); // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable -- Leaving for future use.
?>
<?php echo wp_kses_post( $output ); ?>
</div>
</span>
<?php
} else {
echo '</br>';}
Expand Down Expand Up @@ -379,6 +379,7 @@ function eqd_single_fullwidth_content() {
<span class="entry-info">
<span>
Written By <?php echo wp_kses_post( get_author_posts_link_by_id( $id_meta ) ); ?>
Updated on <?php echo wp_kses_post( get_the_modified_date( 'F j, Y' ) ); ?>
</span>
</span>
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
if ( ! empty( $block_link ) ) {
$url = $link['url'];
$calculator_title = $link['title'];
if( $link['url'] ) {
if ( $link['url'] ) {
echo '<span class="content">';
echo '<a href="' . esc_url( $url ) . '" class="btn btn-dark-bg">';
echo esc_html( $calculator_title );
Expand Down
2 changes: 1 addition & 1 deletion template-parts/blocks/resource-links/resource-links.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@
if ( ! empty( $row['selected_posts'] ) ) {
$selected_posts = $row['selected_posts'];
}
if( 'link' === $row['type_of_button'] ) {
if ( 'link' === $row['type_of_button'] ) {
continue;
}
?>
Expand Down

0 comments on commit bd63031

Please sign in to comment.