WordPress.org

Ready to get started?Download WordPress

Forums

Jetpack by WordPress.com
[resolved] Jetpack processes shortcodes twice? (33 posts)

  1. Tim Moore
    Moderator
    Plugin Author

    Posted 1 year ago #

    In shortcodes, you need to return the data, not echo it. Try:

    <?php
    function foobar_func( $atts ){
    return "Shortcode Test Successfull";
    }
    add_shortcode( 'foobar', 'foobar_func' );
    ?>
  2. zingiri
    Member
    Posted 1 year ago #

    Hi Tim, we still see our Bookings plugin users facing this Jetpack issue. Disabling Jetpack fixes the issue.
    We do return data in our shortcodes and don't echo it.
    We're not using any of the get_the_excerpt or get_the_content or the_excerpt or the_content actions in the plugin.

  3. zingiri
    Member
    Posted 1 year ago #

    By the way, that is with Jetpack version 2.1.2

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.