I've created a quick function and shortcode to allow me to include logged-in user only content:
function content_for_logged_in($atts,$content){
$logged_in_content = "";
if(is_user_logged_in()){
$logged_in_content = $content;
}
return $logged_in_content;
}
add_shortcode('logged-in-content','content_for_logged_in');
But it doesn't parse shortcodes that are within the content, e.g.:
[logged-in-content]
<p>Some test content...</p>
[wpforms id="752"]
[/logged-in-content]
...in this case, the wpforms shortcode is displayed rather than the form.
Is there a way to alter my function so that shortcodes within the content will be parsed?
Thanks, Scott