Created
January 8, 2019 05:36
-
-
Save sitebuilderone/1ad130484a247acf8916755ff058de2e to your computer and use it in GitHub Desktop.
Shotcodes samples
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
<?php | |
// Shortcodes | |
// sitebuilderone.com | |
// https://codex.wordpress.org/Shortcode_API | |
// Shortcodes are supposed to return your html, not echo it. | |
// types: https://speckyboy.com/getting-started-with-wordpress-shortcodes-examples/ | |
function sb1_current_mo_yr() { | |
// return '<p>Hello World!</p>'; | |
// return date("d M Y"); | |
return date("d M Y h:i:s A"); | |
} | |
add_shortcode('_sb1-current-month-year', 'sb1_current_mo_yr'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment