962 posts
  • Bought between 100 and 499 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • Ireland
  • Sold between 10 000 and 50 000 dollars
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
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Exclusive Author
  • Interviewed on the Envato Notes blog
  • Beta Tester
  • Author had a File in an Envato Bundle
  • Author had a Free File of the Month
+4 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
  • Bought between 100 and 499 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • Ireland
  • Sold between 10 000 and 50 000 dollars
EireStudio says

Bingo, thanks Parker, much appreciated!

3256 posts
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Exclusive Author
  • Interviewed on the Envato Notes blog
  • Beta Tester
  • Author had a File in an Envato Bundle
  • Author had a Free File of the Month
+4 more
ParkerAndKent says
RedHenry said
Bingo, thanks Parker, much appreciated!

You’re welcome ;)

by
by
by
by
by
by