In this tutorial we will show you two ways to Modify or Change Date Format in AMP
1 – By using an Option in AMP settings
2 – By using Code
Ago:
Traditional view :
add_filter('ampforwp_modify_post_date','ampforwp_modify_date_index');
function ampforwp_modify_date_index($date) {
$date = get_the_date();
return $date;
}ampforwp_modify_date_index() function code.amp_date() and want to change the date, then you can pass an array like shown below.Example:
amp_date(array('custom_format'=>'l - d, F, Y') );
Date() function to show the date and all the compatible date formats are supported by amp_date() function. Here is the list of all the available date types here.That’s it for this tutorial!
We hope it helped you. If you have any feedback or questions, then please share them in the comments section below.
If you want to add an AWeber form in AMP then first you need to…
Webpushr is the fastest growing web push notifications platform that marketers love & developers rely…
Follow these steps to add Adobe Analytics in AMP Step 1: Go to WordPress Admin Area -> AMP…
Core Web Vitals are the subset of Web Vitals that apply to all web pages,…
The following reasons can be shown for non-indexing. Server error (5xx) Your server returned a 500-level…
We have added the Google Analytics 4 ( GA 4 ) integration in AMPforWP v1.0.80.…