monakh2
12/3/2019 - 6:55 PM

Filter to echo content with shortcode

/*Add filter to echo content with shortcode*/
add_filter( 'echo_shortcode', 'filter_the_content_whith_shortcode' );

function filter_the_content_whith_shortcode( $content ) {
	remove_filter( 'the_content', 'wpautop' );
	$output = apply_filters( 'the_content', $content );
	return $output;
}