You should be able to use do_shortcode()
, with a few modifications:
<?php
echo do_shortcode( '[sws_toggle3 title="' . get_the_title() . '"]' . get_the_content() . '[/sws_toggle3]' );
?>
EDIT
If you need to maintain the formatting of the_content()
, simply pass get_the_content()
through the appropriate filter:
<?php
$content = get_the_content();
$content = apply_filters( 'the_content', $content );
echo do_shortcode( '[sws_toggle3 title="' . get_the_title() . '"]' . $content . '[/sws_toggle3]' );
?>