Add current year on WordPress using Shortcode

117

/**
 * Add current year using shortcode [year]
 */
function current_year() {
    $year = date('j, F Y');
    return $year;
}
add_shortcode('year', 'current_year');

Comments

Submit
0 Comments