机场测评与节点★ 4.5 推荐评级

WordPress关注微信公众号回复可见和阅读更多的方法

博主头像站长评测
发布于 2020/01/01(修订于 2021/01/01)原创独立站体系

自己建立网站后怎么为公众号吸粉?强制要求关注公众号并回复后内容可见就是一个很有效果的公众号导流方法。本文给大家推荐4种需要关注公众号后才能查看网站内容的方法。

方法一:插件版公众号引流

对于普通用户来说,使用插件版是最方便快捷的方法,这里分享的是”微信公众号涨粉“这款插件。

“微信公众号涨粉插件可以隐藏文章中的任意部分内容,当访客关注您的微信公众后,可获取验证码查看隐藏内容.

前台演示效果如下图:

使用方法:

  1. 下载插件安装包
  2. 通过WP后台上传安装插件,并启用
  3. 插件后台设置公众号等信息
  4. 微信公众号后台添加自动回复关键词

插件下载

插件2:微信公众平台验证码查看插件

方法二:代码版公众号引流

1、代码版的方法和插件版类似,把下面的代码复制后粘贴到WordPress主题的函数文件functions.php里面。

注意修改下面代码中的二维码图片地址、名称等内容。

/** * wordpress微信公众号吸粉的3种方法 * https://vpsjichangwiki.blog/skill/weixin-guan-zhu-ke-jian.html */ function lxtx_secret_content($atts, $content=null){ extract(shortcode_atts(array(‘key’=>null,‘keyword’=>null), $atts)); if(isset($_POST[‘secret_key’]) && $_POST[‘secret_key’]==$key){ return ‘

’.$content.‘
’; } else { return ‘
你的二维码名字
此处内容已经被作者无情的隐藏,请输入验证码查看内容
验证码:
请关注“你的名字”官方QQ公众号,回复关键字“’.$keyword.‘”,获取验证码。【注】用手机QQ扫描右侧二维码都可以关注“你的名字”官方QQ公众号。
’; } } add_shortcode(‘gzh2v’, ‘lxtx_secret_content’);

2、把下面代码添加到主题样式文件 style.css 里面。

.post_hide_box, .secret-password{background: none repeat scroll 0 0 #efe;border-left: 5px solid #e74c3c;color: #555;padding: 10px 0 10px 10px;border-radius: 5px;margin-bottom: 15px;overflow:hidden; clear:both;} .post_hide_box .post-secret{font-size: 18px; line-height:20px; color:#e74c3c; margin:5px;} .post_hide_box form{ margin:15px 0;} .post_hide_box form span{ font-size:18px; font-weight:700;} .post_hide_box .erweima{ margin-left:20px; margin-right:16px;} .post_hide_box input[type=password]{ color: #9ba1a8; padding: 6px; background-color: #f6f6f6; border: 1px solid #e4e6e8; font-size: 12px;-moz-transition: border .25s linear,color .25s linear,background-color .25s linear; -webkit-transition: border .25s linear,color .25s linear,background-color .25s linear; -o-transition: border .25s linear,color .25s linear,background-color .25s linear; transition: border .25s linear,color .25s linear,background-color .25s linear;} .post_hide_box input[type=submit] { background: #F88C00; border: none; border: 2px solid;border-color: #F88C00; border-left: none; border-top: none; padding: 0px;width: 100px; height: 38px; color: #fff; outline: 0;border-radius: 0 0 2px 0; font-size: 16px;} .post_hide_box .details span{color:#e74c3c;}

3、添加短代码,写文章的时候可以直接插入短代码在需要关注公众号可见的文章里面。

// 后台文本编辑框中添加公众号隐藏简码按钮 function lxtx_wpsites_add_gzh_quicktags() { if (wp_script_is(‘quicktags’)){ ?>

查看验证码 发布地址 https://www.itbulu.com/weixin-saoma.html **参考资料:** 1. [必须关注微信公众号才能查看指定内容的免费Wordpress插件](https://www.huoduan.com/wechat-fans.html) 2. [WordPress 文章部分内容关注微信公众号后可见](https://www.ilxtx.com/view-contents-by-following-wechat-official-accounts.html)