Plugin called via shortcode appears at the wrong place on post
-
Hello,
I am developing a plugin for my blog and trying to set it up to be called by a shortcode. The plugin works, however when I call it via shortcode it appears at the top of the post, right below the title.
This is my shortcode function:
function my_func($atts) {
extract(shortcode_atts(array(
‘foo’ => ‘no foo’,
‘bar’ => ‘default bar’,
), $atts));return;
my_func_plugin();
return “This line is below plugin”;
}
add_shortcode(‘myfunc’, ‘my_func’);So in the post it appears like this (I put the shortcode at the end of my post content):
1. Post title
2. my_func_plugin
3. Post content
4. The output of the return line in my_func (“This line is below plugin”)What am I missing for the plugin to appear after the post content?
Thank you
- The topic ‘Plugin called via shortcode appears at the wrong place on post’ is closed to new replies.