Shortcode Displaying as Text
-
I’m trying to use a very basic date shortcode on a page and the shortcode itself keeps displaying as text instead of displaying the date.
I added this to my /functions.php page:
function LongDate(){ return date(‘Y’); } add_shortcode(‘mylongdate’, ‘LongDate’);Then, I added [mylongdate] to my page in the editor and it will only display the actual shortcode [mylongdate] instead of the date. I tried adding the shortocde in both the Visual and Text tabs in the editor and that makes no difference.
I am developing this site on a temp URL so I have not installed Jetpack yet. Does Jetpack have to be installed for shortcodes to work?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Shortcode Displaying as Text’ is closed to new replies.