Support » Plugins » Shortcode return text unfortunately filtered

  • I didn’t think what what was returned in a shortcode function was be be filtered further. According to the shortcode api doc:

    “Note: in WordPress 2.5.0, shortcodes were parsed before post formatting was applied, so the shortcode output HTML was sometimes wrapped in p or br tags. This was incorrect behaviour that has been fixed in 2.5.1.”

    But it appears not to be fixed, or maybe I’m reading it wrong. I’ll illustrate with a trivial example.

    function hellothere_func($atts=null, $content=null) {
    return ‘here is the content: ‘ . $content;

    add_shortcode(‘hellothere’, ‘hellothere_func’);

    Whatever I put in the content gets a
    for line feeds and a <p> for blank lines.

    If there any way to get around this? (I’m on 2.7.1

    Thanks, Greg

  • The topic ‘Shortcode return text unfortunately filtered’ is closed to new replies.