2 highlight error in OPs code, added some emphasis on the function name conventions
source | link

There's a general convention in WordPress:

  1. functions prefixed with the_ will echoecho a value
  2. functions prefixed with get_ or get_the_ will returnreturn a value

In your case you need to use get_sub_field() instead of the_sub_field() eg:

echo do_shortcode( get_sub_field( 'slideshare' ) );

The documentation on the ACF site is very comprehensive: http://www.advancedcustomfields.com/resources/functions/get_sub_field/

NOTE: In your example code you didn't need any of the quotes, you could've just passed in the $slides variable directly if you were using get_sub_field()

There's a general convention in WordPress:

  1. functions prefixed with the_ will echo a value
  2. functions prefixed with get_ or get_the_ will return a value

In your case you need to use get_sub_field() instead of the_sub_field() eg:

echo do_shortcode( get_sub_field( 'slideshare' ) );

The documentation on the ACF site is very comprehensive: http://www.advancedcustomfields.com/resources/functions/get_sub_field/

There's a general convention in WordPress:

  1. functions prefixed with the_ will echo a value
  2. functions prefixed with get_ or get_the_ will return a value

In your case you need to use get_sub_field() instead of the_sub_field() eg:

echo do_shortcode( get_sub_field( 'slideshare' ) );

The documentation on the ACF site is very comprehensive: http://www.advancedcustomfields.com/resources/functions/get_sub_field/

NOTE: In your example code you didn't need any of the quotes, you could've just passed in the $slides variable directly if you were using get_sub_field()

1
source | link

There's a general convention in WordPress:

  1. functions prefixed with the_ will echo a value
  2. functions prefixed with get_ or get_the_ will return a value

In your case you need to use get_sub_field() instead of the_sub_field() eg:

echo do_shortcode( get_sub_field( 'slideshare' ) );

The documentation on the ACF site is very comprehensive: http://www.advancedcustomfields.com/resources/functions/get_sub_field/