Custom shortcode stopped working
-
I added a functions.php file to my theme directory containing the following code to create a shortcode tag, [site-link]:
<? function link_shortcode($attr, $content = NULL) { extract( shortcode_atts( array( 'name' => '', 'link' => '', ), $atts ) ); global $post; $link = get_post_meta($post->ID,'site-link', true); $name = get_post_meta($post->ID,'site-name', true); $output = '<span class="source-link">[from <a href="'.$link.'" title="Read the rest of this story">'.$name.'</a>]</span>'; return $output; } ?>
It *was* working beautifully (you can see the output here: http://www.rchseaglesnest.org — the bottom of the page, the “Around the Web” section.), but all of a sudden stopped. Now it just outputs the raw tag, [site-link]
My understanding of what I was doing was tenuous at best when I started. Now I’m not really sure how to troubleshoot — does anybody know factors that might make such a thing “stop working”?
Thanks for any ideas!
Jeff.
- The topic ‘Custom shortcode stopped working’ is closed to new replies.