What is wrong with this Shortcode? I get it in a wrong place inside the content

Couple things: I think your shortcode function should return the value rather than print it, and you shouldn’t have the output wrapped in braces like that (the one just before the first div, and the one just before the return). Unless that’s some obscure php syntax I’ve never seen (which is entirely possible)?

As far as I know, whenever you close a php tag–even inside a function–the parser will just immediately output the results, not return them.

Leave a Comment