962 posts
  • Has been part of the Envato Community for over 6 years
  • Has sold $10,000+ on Envato Market
  • Has collected 100+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
EireStudio says

Hey Guys,

I have a shortcode like so: http://pastebin.com/H9yKjWcn

And it display fine and dandy, but the table always appears at the very top of the page regardless of where I insert it.

For example, I insert the shortcode [nodeposittable] after the first paragraph and it still appears above the first paragraph, always.

Any ideas?

3256 posts
  • Has referred 100+ members
  • Has sold $250,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+9 more
ParkerAndKent says
RedHenry said
Hey Guys,

I have a shortcode like so: http://pastebin.com/H9yKjWcn

And it display fine and dandy, but the table always appears at the very top of the page regardless of where I insert it.

For example, I insert the shortcode [nodeposittable] after the first paragraph and it still appears above the first paragraph, always.

Any ideas?

Shortcodes should return a string. You cannot output the html like you do in the templates or by using echo.

Just return the whole markup as a string, otherwise, like happens to you, the markup output is printed before the content (outside of the html structure of your content), where it should be.

Parker

962 posts
  • Has been part of the Envato Community for over 6 years
  • Has sold $10,000+ on Envato Market
  • Has collected 100+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
EireStudio says

Bingo, thanks Parker, much appreciated!

3256 posts
  • Has referred 100+ members
  • Has sold $250,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+9 more
ParkerAndKent says
RedHenry said
Bingo, thanks Parker, much appreciated!

You’re welcome ;)

by
by
by
by
by
by