Riprov2主题美化:增加悬浮广告引流浮窗内容
这篇教大家如何制作一个悬浮动画广告,来吸引客服进行傻瓜式引流~
效果如下:
未登录及非VIP用户显示,VIP用户自动隐藏
代码修改:
找到:你的域名/wp-content/themes/ripro-v2/header.php,最底部添加如下代码:
<?php
// 给网站添加悬浮动画广告
// 教程地址:https://www.xhhjm.com/3101.html
// 你猜这是干什么的
$vip_type = _get_user_vip_type($current_user->ID);
// 判断当前用户是否为vip / 永久vip
if($vip_type != 'vip'){
if ($vip_type != 'boosvip'){
// 不是则输出以下代码
echo '<div class="showpc"><style>.showpc{display:none;}@media (min-width:960px){.showpc{display:inline;}}</style><div id="wpon_svip_gif" class="wpon_svip_gif" style="display: block;">
<div class="kubao" style="display: none;"></div><p><a class="link animated" href="https://www.xhhjm.com/3101.html" data-stat="升级SVIP活动特价" target="_blank" title="虎年VIP优惠券限时限量放送中" style="border: none; box-shadow: none;"><br><img src="https://cdn.mmsto.com/winmac/wp-content/themes/ripro-v2/assets/img/E-1234991-254A682B.gif" ><br></a></p></div></div>';}}?>
后台选择外观-自定义-额外css,添加如下代码:
#wpon_svip_gif {
display: none;
width: 200px;
height: 61px;
border-radius: 0 0 13px 13px;
z-index: 1002;
left: 30px;
bottom: 240px;
position: fixed;
}