Hi Perials,
Thanks for the help! I figured out it is working when I select one of the “Show on” options, but the media buttons are being displayed twice. I did hope the shortcode would work without having to select one of the “Show on” options (because I would like to add it manually on a custom post type page). I think it’s because this part of code:
if( is_home() && !in_array( 'home', (array)$s3_options['ss-show-on'] ) )
return '';
if( is_single() && !in_array( 'posts', (array)$s3_options['ss-show-on'] ) )
return '';
if( is_page() && !in_array( 'pages', (array)$s3_options['ss-show-on'] ) )
return '';
if( is_archive() && !in_array( 'archive', (array)$s3_options['ss-show-on'] ) )
return '';
I found a workaround by selecting “Posts”, but removing the content filter:
add_filter( 'the_content', array( $this, 'append_s3_html' ) );
Is there another way to make the shortcode work by itself?