Last active
June 27, 2023 12:03
-
-
Save Glinkfr/a99bdbd362a739905be1cdb309f0de4e to your computer and use it in GitHub Desktop.
Création du shortcode pour afficher l'année en cours par exemple dans le footer
This file contains hidden or 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
/** | |
* Création du shortcode Année en cours. | |
*/ | |
// utilisez [year] dans vos widgets, pages, articles ou votre footer | |
function shortcode_year() { | |
$year = date('Y'); | |
return $year; | |
} | |
add_shortcode('year', 'shortcode_year'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment