add_shortcode problem!
-
Hello, im trying to add some shortcodes to my wordpress, but it give me an error on any of my scripts, here is one of them:
function permalink_thingy($atts) { extract(shortcode_atts(array( 'id' => 1, 'text' => "" // default value if none supplied ), $atts)); if ($text) { $url = get_permalink($id); return "<a href=".$url." rel='nofollow'>$text</a>"; } else { return get_permalink($id); } } add_shortcode('permalink', 'permalink_thingy');I put this on my functions.php i dont know whats the problem.
The error i get is this one:Fatal error: Call to undefined function add_shortcode() in /home/xxxxx/public_html/wp-includes/functions.php on line 66
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘add_shortcode problem!’ is closed to new replies.