shortcode in functions.php or shortcodes.php
-
I am new to wordpress but experienced in php. I read and re-read the Shortcodes API codex. It doesn’t explain where to add a new shortcode function. I assumed “wp-includes/shortcodes.php” but that didn’t seem to do anything. In an article in Smashing Magazine they say it’s “wp-includes/functions.php” When I add my code there, I get the error: Fatal error: Call to undefined function add_shortcode() in /Users/garydavis/Sites/wordpress/wp-includes/functions.php on line 3557
Where do I add the shortcode function I wrote?
If one of the aforementioned files, perhaps a wp config setting (or apache setting) could be wrong?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘shortcode in functions.php or shortcodes.php’ is closed to new replies.