3007 posts
  • 5 Years of Membership
  • Affiliate Level 5
  • Author Level 9
  • Bundle Boss
+8 more
duotive
says
atinder said
the difference between the two is same as

echo and return in PHP .

hope this makes sense :)

I have to disagree. If you use echo instead of return in the shortcode api, the content returned by the shortcode will be placed at the begining on the page/post, regardless of where you place it in your text.

236 posts
  • Author Level 5
  • Beta Tester
  • Collector Level 1
  • Exclusive Author
+1 more
GradaStudio
says
duotive said
atinder said
the difference between the two is same as

echo and return in PHP .

hope this makes sense :)
I have to disagree. If you use echo instead of return in the shortcode api, the content returned by the shortcode will be placed at the begining on the page/post, regardless of where you place it in your text.

agree with you. thats why i needed this function

in shortcode if i use dynamic_sidebar(‘sidebar’) it echos at the top of page.can’t return contents.

but if when i used the function given above i can return the contents in shortcode :)

by
by
by
by
by
by