Last active
May 19, 2020 10:42
-
-
Save nirbhay18/2d717ede35af6d7fde19bfca9c55a4ee to your computer and use it in GitHub Desktop.
Customize date format for Post Timeline
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function pp_timeline_custom_date_format() { | |
$date = get_post_meta( get_the_ID(), 'mec_start_date', true ); | |
$timestamp = strtotime( $date ); | |
$new_date = date( 'F j', $timestamp ); | |
return $new_date; | |
} | |
add_filter( 'pp_timeline_date_format','pp_timeline_custom_date_format' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment