Last active
July 5, 2021 12:38
-
-
Save jamesfosker/6fd1533a2132a03f1f9d55d576560c9c to your computer and use it in GitHub Desktop.
Company Age shortcake
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
<?php | |
function companyage(){ | |
$currentyear = date("Y"); | |
$foundedyear = '1979'; //change year to your own year | |
$companyage = $currentyear - $foundedyear; | |
return = $companyage; | |
} | |
add_shortcode('mycompanyage', 'companyage'); | |
// use [mycompanyage] to output the business age in years |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment