具体实现步骤如下:
1、将以下代码添加到Three主题的functions.php文件最后一个?>的前面。
//部分内容登录可见
function login_to_read($atts, $content=null) {
extract(shortcode_atts(array("notice" => '
温馨提示:此处内容需要登录后才能查看!
'), $atts));
if ( is_user_logged_in() && !is_null( $content ) && !is_feed() )
return $content;
return $notice;
...