有时,你可能需要在日志向注册用户显示一些特定内容,比如只有注册用户才能看到的下载链接、免费资源等等,以此鼓励你的读者注册。。用WordPress简码可以方便的实现这一点。首先将以下代码粘贴到function.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 '';}完成后,将以下代码放入你的日志中: