Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Possible Duplicate:
Shortcode always displaying at the top of the page

I have a wordpress site with wp e-commerce plugin and gold cart plugin.

I have created a worpdress page with following:

———————————————–

some text some details about the page

[shortcode]

———————————————–

I have 2 different div blocks and shortcode is after the page content. But when the page renders the shortcode outputs first before the page content.

Can anyone help me to output the page content first and then the shortcode?

Thanks in advance for help.

Jaspal Singh aka jsxtech

share|improve this question

marked as duplicate by toscho Jun 28 '12 at 20:31

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
please post more details such as what shortcode you are using, and if this is coming from the plugin. –  Michael Jun 28 '12 at 10:34
add comment

1 Answer 1

I guess you've echoed the result of shortcode callback function rather than returning them. Please check here: http://codex.wordpress.org/Shortcode_API

Shortcodes are written by providing a handler function. Shortcode handlers are broadly similar to WordPress filters: they accept parameters (attributes) and return a result (the shortcode output).

you need to return the output that will be added to your content. if you echo them, it will be printed before the content.

if this is the not problem, please put the codes so that we can see what is the error.

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.