WordPress.org

Ready to get started?Download WordPress

Forums

text won't appear above shortcode (3 posts)

  1. xiabolai
    Member
    Posted 3 years ago #

    hi, have a nagging issue that i can't solve. looked everywhere in the forum...i've seen this question asked, but no answer yet.

    i'm using a plugin called "WPECARDS" that uses a shortcode. everything's fine, EXCEPT i cannot get text i write in the post to appear ABOVE the shortcode. no matter what i do, the text always appears BELOW the shortcode generated content.

    for example, if i write this in a post:
    intro copy, intro copy, intro copy
    [wpecards]

    it always appears like this:
    [wpecards]
    intro copy, intro copy, intro copy

    i read something about having to use "return" instead of "echo" in the plugin, but i didn't write the plugin, nor am i a programmer.

    i did find this code which is supposed to place the text above the shortcode, but i don't know where it goes:

    ob_start();
    
    [PHP script or function call]
    
    $result = ob_get_contents();
    ob_end_clean();
    return $result;

    can anybody help me?

  2. surfershort
    Member
    Posted 3 years ago #

    Im having the same problem. Can anyone help?

    Cheers

  3. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    @surfershort

    can you post the full code of your shortcode function?

    and the area where it is called in the post or page?

    (if it is longer then a few lines, please paste it into a http://wordpress.pastebin.com/ and post the link to it here)

    a link to your site might also help to illustrate the problem.

Topic Closed

This topic has been closed to new replies.

About this Topic