在用户未登录的情况下文章内的图片呈模糊装,吸引游客登录
实现方法
在functions.php
底部加入代码
//未登录文章详情页内图片模糊
function n_yingcang_css(){
echo '<style>
.entry-content img {
-webkit-filter: blur(10px)!important;
-moz-filter: blur(10px)!important;
-ms-filter: blur(10px)!important;
filter: blur(6px)!important;}
</style>';
}
if( !is_user_logged_in()) {add_action( 'wp_head', 'n_yingcang_css' );};
© 版权声明
吾爱博客|AYFRE.COM 版权所有,转载请标明出处
THE END
喜欢就支持以下吧
请登录后发表评论
注册
社交帐号登录