Hi Mike,
we can create a couple of short codes with this snippet:
add_shortcode('USER','show_user_content');
function show_user_content($atts,$content = null){
global $post;
if (is_user_logged_in()){
return $content;
}
return '';
}
add_shortcode('GUEST','show_guest_content');
function show_guest_content($atts,$content){
if (!is_user_logged_in()){
return $content;
}
return '';
}
https://docs.generatepress.com/article/adding-php/
Then its just a case of wrapping the content in each of the shortcode names:
[USER]I am logged in[/USER]
[GUEST]I am not logged in [/GUEST]