找到另外一種方法了
去functions.php加入下列代碼
add_shortcode( 'member', 'member_check_shortcode' );
function member_check_shortcode( $atts, $content = null ) {
if ( is_user_logged_in() && !is_null( $content ) && !is_feed() )
return $content;
return '';
}
發表文章時候
[member]你要的隱藏內容[/member]
這樣就可以了