I am using "Ultimate Member" plugin to allow users to register because I want some content to be restricted for not signed-in users. According to their documentation, there are a few shortcodes for that and I'm trying to sue one in a template like this:
<?php
$out_content = get_template_part( 'templates/template-parts/loggedout', 'content' );
do_shortcode("[um_loggedout] {$out_content} [/um_loggedout]");
?>
<?php
$in_content = get_template_part( 'templates/template-parts/loggedout', 'content' );
do_shortcode("[um_loggedin] {$in_content} [/um_loggedin]");
?>
Actually, both template parts are output this way, is this something that can be done?