Possible Duplicate:
problem with short code
Shortcodes are broken.
For those of you playing at home, heres an easy step by step to replicate my problem.
1) Open a fresh WordPress install (3.4.2).
2) Go into twentyeleven/functions.php and add the following:
function test() {
echo '-TEST-';
}
add_shortcode('testshortcode', 'test');
3) Edit the ‘hello world’ post to say:
Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!
[testshortcode]
foobar
4) Save and view, my results look like the following:
-TEST-
Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!
foobar
when it should look like this:
Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!
-TEST-
foobar
What on earth is going on here?