//FUNCTION.PHP
function member_check_shortcode($atts, $content = null) {
if (is_user_logged_in() && !is_null($content) && !is_feed()) {
return $content;
} else {
return 'Sorry, this part is only available to our members. Click here to become a member!';
}
add_shortcode('member', 'member_check_shortcode');
//add the following to your posts to create a section or text (or any other content) that will be displayed only to registered users:
[member]
This text will be displayed only to registered users.
[/member]