Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

Add current year on WordPress using Shortcode

/**
 * Add current year using shortcode [year]
 */
function current_year() {
    $year = date('j, F Y');
    return $year;
}
add_shortcode('year', 'current_year');
Source by divimundo.com #
 
PREVIOUS NEXT
Tagged: #Add #current #year #WordPress #Shortcode
ADD COMMENT
Topic
Name
1+3 =