By Stephen Walker
Share
This will create a shortcode for rendering today’s date.
Snippet
Add this to your functions.php, or your favorite code management tool.
function displayTodaysDate( $atts )
{
return date(get_option('date_format'));
}
add_shortcode( 'datetoday', 'displayTodaysDate');
Originally published on Dec. 18, 2022