diff --git a/wp-showhide.php b/wp-showhide.php index 292b38d..0ac6327 100644 --- a/wp-showhide.php +++ b/wp-showhide.php @@ -44,6 +44,8 @@ function showhide_textdomain() { add_shortcode( 'showhide', 'showhide_shortcode' ); function showhide_shortcode( $atts, $content = null ) { // Variables + static $shortcode_number = 0; // Used to make each showhide unique + $shortcode_number++; $post_id = get_the_id(); $word_count = number_format_i18n( sizeof( explode( ' ', strip_tags( $content ) ) ) ); @@ -73,8 +75,8 @@ function showhide_shortcode( $atts, $content = null ) { } // Format HTML Output - $output = '
'; - $output .= '