exist Astra thematic by default, it will display the article's Release Datebut (not) Last update date Then it appears in the code for SEO respond in singing Schema markup is used. If you wish to display the front-end Last update date Instead of a release date, add custom code to enable this functionality.
![Image [1] - How to show "Last Updated" date instead of "Released" date in Astra Theme](https://www.361sale.com/wp-content/uploads/2025/04/20250422135513913-image.png)
Here are the steps to do so.
![Image [2] - How to show "Last Updated" date instead of "Released" date in Astra Theme](https://www.361sale.com/wp-content/uploads/2025/04/20250422112425614-image.png)
Show last updated date in article metadata
![Image [3] - How to show "Last Updated" date instead of "Released" date in Astra Theme](https://www.361sale.com/wp-content/uploads/2025/04/20250422135630751-image.png)
The release date and update date are provided in the markup.
To be only in the article'smetadatadisplayed in Last update date, you can add the following code:
/**
* Show last modified date in article metadata only.
*
* @param String $output The last modified date token.
* @return void
*/
function your_prefix_post_date( $output ) {
$output = '';
$format = apply_filters( 'astra_post_date_format', '' );
$modified_date = esc_html( get_the_modified_date( $format ) );
$modified_on = sprintf(
esc_html( '%s' ),
$modified_date
);
$output . = '';
$output . = ' ' . $modified_on . '';
$output . = '';
return $output.
}
add_filter( 'astra_post_date', 'your_prefix_post_date' );
This code hides the Release Dateand display only Last update date. Website visitors will see the latest revision time.
![Image [4] - How to show "Last Updated" date instead of "Released" date in Astra Theme](https://www.361sale.com/wp-content/uploads/2025/04/20250422135659266-image.png)
Display the "last updated" date in the date box of the blog archive page
If one wishes to be Blog archive page in the date box of the "Last Updated" Date, not Release Date, use the following code:
/**
* Only the last modification date is displayed in the article box date format.
*
* @param String $output The marker for the last modified date.
* @return void
*/
function astra_date_box_time( $output ) {
$time_string = '<time class="entry-date published" datetime="%1$s"><span class="date-month">%2$s</span> <span class="date-day">%3$s</span> <span class="date-year">%4$s</span></time><time class="updated" datetime="%5$s">%6$s</time>';
$output = sprintf(
$time_string,
esc_attr( get_the_date( 'c' ) ),
esc_html( get_the_modified_date( 'M' ) ),
esc_html( get_the_modified_date( ) )
).
return $output.
}
add_filter( 'astra_date_box_time_format', 'astra_date_box_time' );
This code ensures that the date frame displayed in Last update dateThe
![Image [5] - How to show "Last Updated" date instead of "Released" date in Astra Theme](https://www.361sale.com/wp-content/uploads/2025/04/20250422135708714-image.png)
Important Notes:
- If you are going to be in the article page respond in singing date frame are shown in the Last update date, two codes need to be used.
- Add the code to the subtheme(used form a nominal expression)
functions.phpfile Center.
Why use child themes?
utilization Astra subtheme Allows you to make customizations without modifying the original code of the parent theme. This way, even if the parent theme is updated, all customization changes will not be lost.
Child themes help to better manage code and avoid conflicts with other plugins or themes. Custom code is isolated from the core functionality of the theme to ensure the independence and security of modifications.
summarize
exist Astra thematic After adding the custom code, you can easily implement the Show last updated date in article and date boxes. This way, both on individual post pages andBlog Archivepage, visitors are able to see the most accurate update time. Making changes using a child theme ensures that custom code is not affected by updates to the parent theme, helping to manage the site efficiently.
Latest Articles
Link to this article:https://www.361sale.com/en/51213The article is copyrighted and must be reproduced with attribution.




















![Emoji[wozuimei]-Photonflux.com | Professional WordPress repair service, worldwide, rapid response](https://www.361sale.com/wp-content/themes/zibll/img/smilies/wozuimei.gif)
![Emoticon[baoquan] - Photon Wave Network | Professional WordPress Repair Services, Worldwide Coverage, Rapid Response](https://www.361sale.com/wp-content/themes/zibll/img/smilies/baoquan.gif)

No comments