971 posts
  • 6 Years of Membership
  • Author Level 5
  • Collector Level 4
  • Exclusive Author
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
  • Affiliate Level 4
  • Author Level 9
  • Collector Level 2
  • Top Monthly Author
+11 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

971 posts
  • 6 Years of Membership
  • Author Level 5
  • Collector Level 4
  • Exclusive Author
EireStudio
says

Bingo, thanks Parker, much appreciated!

3256 posts
  • Affiliate Level 4
  • Author Level 9
  • Collector Level 2
  • Top Monthly Author
+11 more
ParkerAndKent
says
RedHenry said
Bingo, thanks Parker, much appreciated!

You’re welcome ;)

by
by
by
by
by
by