Hello @immmukeshpatel
Yes, You can modify the template as you like, please follow the below process
The process is only applicable if you are using Reader Mode with legacy theme.
1. Create a /amp/
directory in your current active theme /wp-content/themes/blocksy/amp/
2. Copy meta-time.php from wp-content/plugins/amp/template/meta-time.php
to the newly created directory in theme /wp-content/themes/blocksy/amp/meta-time.php
3. now modify the newly copied file as by replacing post_publish_timestamp
to post_modified_timestamp
the modified file looks like below:
<?php
/**
* Post date template part.
*
* ??????
* DO NOT EDIT THIS FILE WHILE INSIDE THE PLUGIN! Changes You make will be lost when a new version
* of the AMP plugin is released. You need to copy this file out of the plugin and put it into your
* custom theme, for example. To learn about how to customize these Reader-mode AMP templates, please
* see: https://amp-wp.org/documentation/how-the-plugin-works/classic-templates/
* ??????
*
* @package AMP
*/
/**
* Context.
*
* @var AMP_Post_Template $this
*/
?>
<div class="amp-wp-meta amp-wp-posted-on">
<time datetime="<?php echo esc_attr( gmdate( 'c', $this->get( 'post_modified_timestamp' ) ) ); ?>">
<?php
echo esc_html(
sprintf(
/* translators: %s: the human-readable time difference. */
__( '%s ago', 'amp' ),
human_time_diff( $this->get( 'post_modified_timestamp' ), time() )
)
);
?>
</time>
</div>
Once the change has done, your AMP pages will get display last updated date instead of published date.
We hope this helps!