Created
November 15, 2018 07:11
-
-
Save masumskaib396/97f920b01d223cc72ac9a5a420ffd360 to your computer and use it in GitHub Desktop.
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
if (is_day()) { | |
printf('%s', get_query_var('day')); | |
}elseif (is_month()) { | |
$month = get_query_var( 'monthnum' ); | |
$month_object = DateTime::createFromFormat('!m',$month); | |
echo $month_object->format('F'); | |
}elseif (is_year()) { | |
printf('%s-%s-%s', get_query_var( 'year','monthnum','day' )); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment