Tested on: WordPress 3.0.1
function content_only4logged_in($content) {
// ALL LOGGED IN USERS
if ( is_user_logged_in() &&
!is_null($content) &&
!is_feed()
) {
return $content;
} else {
$content = wp_html_excerpt( $content, 80 );
$content .= ' …';
$content .= __( 'Sorry, more of this content is only available for logged users.', FB_TEXTDOMAIN );
return $content;
}
}
add_action( 'the_content', 'content_only4logged_in' );
more possibilities and informations on the post http://wpengineer.com/2046/control-the-wordpress-content-via-userrights-or-time/