Dragon
  从2024.3.22起,评论不再增加积分,转而将原来每日签到的2积分,提升为每日签到获取6积分,签到按钮在『用户中心-财富一栏』,感谢理解~祝大家每日好心情~
  • 从2024.3.22起,评论不再增加积分,转而将原来每日签到的2积分,提升为每日签到获取6积分,签到按钮在『用户中心-财富一栏』,感谢理解~祝大家每日好心情~
  • 本站限时开启补差价升级VIP通道  前往升级
  • 老刘弹互联网博客已强势开启『积分抽奖』功能,奖品多多,中奖率100%,快快来体验吧『前往抽奖
  • 为了维护良好的使用体验,博客已开启垃圾评论过滤,以及刷评论限制,请各位亲认真评论,友好交流,感谢支持。
  • 老刘弹互联网是老刘的个人博客,所售卖的一些资源无法开具发票或者收据,敬请理解。
  • 下载本站资源建议使用电脑来操作,使用手机操作不保证使用体验哈~
老刘一号老刘一号  2023-01-10 17:10 老刘弹互联网 隐藏边栏 |   抢沙发  466 
文章评分 1 次,平均分 5.0

温馨提醒:本文最后更新于2023年6月5日,部分网盘链接偶尔抽风,下载地址如有失效,请在文章评论区留言或者请私信老刘反馈。

老刘一开始接触网站,使用的就是WordPress建站,这期间用过不少的WP主题,第一个使用的就是enfold主题,主要做企业展示站,博客站,它在国外theme forest销量很高。第一个购买的正版主题就是日主题,油条开发的,国内资源站很多都是使用的他的主题,还有诸如总裁主题,corepress主题等等,老刘在使用这些主题的时候,会多多少少改一些代码美化一下网站,此文主要记录老刘那些年改过的代码,算是老刘的个人笔记吧,放到博客,也供大家参考。

推荐阅读

国内优秀开源WordPress主题合集(持续收录中……)-BG
国内优秀开源WordPress主题合集(持续收录中……)

国内优秀开源WordPress主题合集(持续收录中……)

导语:本文长时间收录优秀国内优秀开源WordPress主题,至于为什么不收录国外的WP主题,因为国外主题在国内使用,会有加载不完的css,前后台一直转圈等等因素,当然后面可能会出一期优秀的国...

代码来喽

  • 这其中包含美化代码,功能性代码。

网站切换为鸿蒙字体

  • 外观-设置-自定义css
/*全局鸿蒙字体开始*/
@font-face {
    font-family:'HarmonyOS_Sans_SC_Medium';
	font-style: normal;
	font-weight: normal;
    src: url('https://cdn.jsdelivr.net/gh/irozhi/HarmonyOS-Sans/HarmonyOS_Sans_SC/HarmonyOS_Sans_SC_Medium.woff2') format('woff2'),
         url('https://cdn.jsdelivr.net/gh/irozhi/HarmonyOS-Sans/HarmonyOS_Sans_SC/HarmonyOS_Sans_SC_Medium.woff') format('woff');
}
*:not([class*="icon"]):not(i) {
font-family: "HarmonyOS_Sans_SC_Medium"!important;
}
/*全局鸿蒙字体结束*/

enfold 5.0的加速设置

  • 首先,关闭google字体就不用说了,可以在主题设置里面关闭,也可以安装国内镜像插件解决,这个就不多介绍了,大多数人都会处理。
  • 谷歌地图接口更换

打开主题后台设置的时候异常的慢,我们检查了源代码,发现主题在加载maps.googleapis.com,当然Google地图我们也是被墙了的,所以我们需要关闭google地图加载,但是试了很多方法都失败了,所以下面我们用Dreamweaver软件或者其他代码编辑器进行google地图加载的替换或者删除,其实我们国内有一个Google地图镜像是可以用的,那就是:ditu.google.cn,在宝塔里面全部进行替换:

  • 源码移除

插件源码,删除前台多余的head标记,我们发现前端代码中有http://gmpg.org/xfn/11这样的加载,明显我们国内用不上,把它移除,通过插件发现了文件的位置:enfold/framework/php/function-set-avia-frontend.php文件中

if( ! function_exists( 'avia_set_profile_tag' ) )
{
	/**
	 * generates the html profile head tag
	 *
	 * @param boolean $echo
	 * @return string				the html head tag
	 */
/*移除开始	function avia_set_profile_tag( $echo = true )
	{
		$output = apply_filters( 'avf_profile_head_tag', '<link rel="profile" href="http://gmpg.org/xfn/11" />' . "\n" );

		if( $echo )
		{
			echo $output;
			return;
		}

		return $output;
	}

	add_action( 'wp_head', 'avia_set_profile_tag', 10, 0 );
}


if( ! function_exists( 'avia_set_rss_tag' ) )
{移除结束*/

另外,enfold主题在4.5及以上版本中主题设置中加入了性能功能,可以压缩CCS和JS,已经禁用主题元素的加载,以提升速度!

  • 自定义 css
h1, h2, h3, h4, h5, h6 { text-transform: none !important; }
.sub_menu_socket {
    display: none;
}
//版权居中
#socket .copyright {
    text-align: center;
    width: 100%;
}
//erphpdown插件自定义
.wppay-custom-modal-box .wppay-modal .erphp-wppay-qrcode 
.tab{float:none;border:none}
  • 版权文字
2021 Copyright © 麦芒摄影工作室 版权所有 | <a href="https://beian.miit.gov.cn/" target="_blank">豫ICP备2021015792号-1</a> | <a href="http://www.beian.gov.cn/portal/index.do" target="_blank" rel="noreferrer nofollow"><img style=" display: inline-block; height: 16px; margin-right: 2px; " src="http://i.mmsto.com/wp-content/uploads/2022/01/beian.png" alt="">豫公网安备 41010502005057号</a>[nolink]
  • 同页跳转代码
<a id="pay">推荐购买方式</a>
#pay

注:#pay放到你需要跳转的按钮自定义链接里,需要跳转到指定位置的文字更改为第一行代码。

自定义缩放WP网站代码

html {
    zoom: 0.9;
    -moz-transform: scale(0.9);
    -moz-transform-origin: 0 0;
}
  • 添加到自定义css里面即可
  • 居中对齐的话,代码
更改-moz-transform-origin: center 0; 
新增transform-origin: center 0;

riprov2侧边悬浮栏添加二维码

<span class="reward-qrcode"><span><img src="二维码图片地址">微信扫一扫反馈</span></span>

备案代码

Copyright © 2021-2022 公司名字 - All rights reserved | <a href="https://beian.miit.gov.cn" style="color:#777777" target="_blank" rel="noreferrer nofollow">ICP备案号</a> | <a href="http://www.beian.gov.cn/portal/index.do" style="color:#777777" target="_blank" rel="noreferrer nofollow"><img style=" display: inline-block; height: 18px; margin-right: 2px; " src="国徽图标链接" alt="国徽">公安备案号</a>

WP网站右键美化代码

  • 效果

  • 代码
<!-- 右键美化 by 主题屋 -->
<style type="text/css">
    a {text-decoration: none;}
    div.usercm{background-repeat:no-repeat;background-position:center center;background-size:cover;background-color:#fff;font-size:13px!important;width:130px;-moz-box-shadow:1px 1px 3px rgba
(0,0,0,.3);box-shadow:0px 0px 15px #333;position:absolute;display:none;z-index:10000;opacity:1; border-radius: 5px;}
    div.usercm ul{list-style-type:none;list-style-position:outside;margin:0px;padding:0px;display:block}
    div.usercm ul li{margin:0px;padding:0px;line-height:35px;}
    div.usercm ul li a{color:#666;padding:0 15px;display:block}
    div.usercm ul li a:hover{color:#fff;background:#28a745}
    div.usercm ul li a i{margin-right:10px}
    a.disabled{color:#c8c8c8!important;cursor:not-allowed}
    a.disabled:hover{background-color:rgba(255,11,11,0)!important}
    div.usercm{background:#fff !important;}
    </style>
<div class="usercm" style="left: 199px; top: 5px; display: none;">
    <ul>
        <li><a href="https://mmsto.com/winmac/"><i class="fa fa-home fa-fw"></i><span>首页</span></a></li>
        <li><a href="javascript:void(0);" onclick="getSelect();"><i class="fa fa-copy fa-fw"></i><span>复制</span></a></li>
        <li><a href="javascript:history.go(1);"><i class="fa fa-arrow-right fa-fw"></i><span>前进</span></a></li>
        <li><a href="javascript:history.go(-1);"><i class="fa fa-arrow-left fa-fw"></i><span>后退</span></a></li>
        <li style="border-bottom:1px solid gray"><a href="javascript:window.location.reload();"><i class="fa fa-spinner fa-spin fa-fw"></i><span>刷新</span></a></li>        
        <li><a href="javascript:void(0);"  onclick="baiduSearch();"><i class="fa fa-paw fa-fw"></i><span>百度</span></a></li>
        <li><a href="javascript:void(0);" onclick="sougouSearch();"><i class="fa fa-search fa-fw"></i><span>搜狗</span></a></li>
        <li><a href="javascript:void(0);" onclick="googleSearch();"><i class="fa fa-google fa-fw"></i><span>谷歌</span></a></li>
     </ul>
</div>
<script type="text/javascript">
    (function(a) {
        a.extend({
            mouseMoveShow: function(b) {
                var d = 0,
                    c = 0,
                    h = 0,
                    k = 0,
                    e = 0,
                    f = 0;
                a(window).mousemove(function(g) {
                    d = a(window).width();
                    c = a(window).height();
                    h = g.clientX;
                    k = g.clientY;
                    e = g.pageX;
                    f = g.pageY;
                    h + a(b).width() >= d && (e = e - a(b).width() - 5);
                    k + a(b).height() >= c && (f = f - a(b).height() - 5);
                    a("html").on({
                        contextmenu: function(c) {
                            3 == c.which && a(b).css({
                                left: e,
                                top: f
                            }).show()
                        },
                        click: function() {
                            a(b).hide()
                        }
                    })
                })
            },
            disabledContextMenu: function() {
                window.oncontextmenu = function() {
                    return !1
                }
            }
        })
    })(jQuery);
 
    function getSelect() {
        "" == (window.getSelection ? window.getSelection() : document.selection.createRange().text) ? layer.msg("请选择需要百度的内容!") : document.execCommand("Copy")
    }
    function baiduSearch() {
        var a = window.getSelection ? window.getSelection() : document.selection.createRange().text;
        "" == a ? layer.msg("请选择需要百度的内容!") : window.open("https://www.baidu.com/s?wd=" + a)
    }
    function sougouSearch() {
        var a = window.getSelection ? window.getSelection() : document.selection.createRange().text;
        "" == a ? layer.msg("请选择需要搜狗的内容!") : window.open("https://www.sogou.com/web?query=" + a)
    }
    function googleSearch() {
        var a = window.getSelection ? window.getSelection() : document.selection.createRange().text;
        "" == a ? layer.msg("请选择需要谷歌的内容!") : window.open("https://www.google.com/search?q=" + a)
    }
    $(function() {
        for (var a = navigator.userAgent, b = "Android;iPhone;SymbianOS;Windows Phone;iPad;iPod".split(";"), d = !0, c = 0; c < b.length; c++) if (0 < a.indexOf(b[c])) {
            d = !1;
            break
        }
        d && ($.mouseMoveShow(".usercm"), $.disabledContextMenu())
    });
</script>
<!-- 右键美化结束 by 主题屋 -->
  • 使用方法:复制以上代码到你的主题的footer.php文件即可,如安装子主题,就复制到子主题的footer.php

倒计时HTML代码

  • 效果

  • 代码
<div class="gn_box">
<h2><center><font color=#E80017>女</font><font color=#D1002E>神</font><font color=#BA0045>节</font><font color=#A3005C>优</font><font
color=#8C0073>惠</font><font color=#75008A>-</font><font color=#5E00A1>结</font><font
color=#4700B8>束</font><font color=#3000CF>倒</font><font color=#1900E6>计</font><font color=#0200FD>时</font>
</center></h2>
<center>
<div id="CountMsg" class="HotDate">
<span id="t_d">1 天</span>
<span id="t_h">5 时</span>
<span id="t_m">15 分</span>
<span id="t_s">42 秒</span>
</div>
</center>
<script type="text/javascript"> function getRTime() {
var EndTime = new Date('2022/03/09 00:00:00');
var NowTime = new Date();
var t = EndTime.getTime() - NowTime.getTime();
var d = Math.floor(t / 1000 / 60 / 60 / 24);
var h = Math.floor(t / 1000 / 60 / 60 % 24);
var m = Math.floor(t / 1000 / 60 % 60);
var s = Math.floor(t / 1000 % 60);
document.getElementById("t_d").innerHTML = d + " 天";
document.getElementById("t_h").innerHTML = h + " 时";
document.getElementById("t_m").innerHTML = m + " 分";
document.getElementById("t_s").innerHTML = s + " 秒";
}
setInterval(getRTime, 1000);
</script>
</div>

wordpress图片相关html代码

  • 纯图模式
<img width="130" height="130" src="https://mmsto.com/winmac/wp-content/uploads/2022/02/25_4c6e0b73b275fc40e7d967ff6b8d687c.png" class="image wp-image-1873  attachment-100x100 size-100x100" alt="" loading="lazy" style="max-width: 100%; height: auto;" title="扫码咨询">
  • 带跳转可控图片大小
<a target="_blank" href="https://mmsto.com/cn/user?action=vip" rel="noopener"><img width="440" height="240" src="https://mmsto.com/cn/wp-content/uploads/2022/02/1645610765-987f770a210d7c6.jpg" alt="mouse" class="image wp-image-1876  attachment-full size-full" rel="nofollow noopener noreferrer" style="max-width: 100%; height: auto;"></a>
  • 带标题文字跳转
<a href="https://ritheme.com/" target="_blank" rel="nofollow noopener noreferrer" data-toggle="tooltip" data-html="true" title="" data-original-title="<u>广告:</u>多款wordpress正版主题打包仅需499"><img src="https://ripro.rizhuti.com/wp-content/themes/ripro-v2/assets/img/ads-2.jpg" style=" width: 100%; "></a>
  • 不带标题文字跳转
<a href="https://mmsto.com/winmac/user/vip" target="_blank" rel="nofollow noopener noreferrer" data-toggle="tooltip" data-html="true" ><img src="https://mmsto.com/winmac/wp-content/uploads/2022/01/tigersale.png" alt="mouse" style=" width: 100%; "></a>

彻底禁用wordpress更新代码

/*彻底关闭自动更新(核心程序/主题/插件/翻译自动更新*/
add_filter('automatic_updater_disabled', '__return_true');
/*关闭更新检查定时作业*/
remove_action('init', 'wp_schedule_update_checks');
/*移除已有的版本检查定时作业*/
wp_clear_scheduled_hook('wp_version_check');
/*移除已有的插件更新定时作业*/
wp_clear_scheduled_hook('wp_update_plugins');
/*移除已有的主题更新定时作业*/
wp_clear_scheduled_hook('wp_update_themes');
/*移除已有的自动更新定时作业*/
wp_clear_scheduled_hook('wp_maybe_auto_update');
/*移除后台内核更新检查*/
remove_action( 'admin_init', '_maybe_update_core' );
/*移除后台插件更新检查*/
remove_action( 'load-plugins.php', 'wp_update_plugins' );
remove_action( 'load-update.php', 'wp_update_plugins' );
remove_action( 'load-update-core.php', 'wp_update_plugins' );
remove_action( 'admin_init', '_maybe_update_plugins' );
/*移除后台主题更新检查*/
remove_action( 'load-themes.php', 'wp_update_themes' );
remove_action( 'load-update.php', 'wp_update_themes' );
remove_action( 'load-update-core.php', 'wp_update_themes' );
remove_action( 'admin_init', '_maybe_update_themes' );
/*关闭程序更新提示*/
add_filter( 'pre_site_transient_update_core', function($a){ return null; });
/*关闭插件更新提示*/
add_filter('pre_site_transient_update_plugins', function($a){return null;});
/*关闭主题更新提示*/
add_filter('pre_site_transient_update_themes', function($a){return null;});

WordPress网站页面漫天雪花js代码

<script src="https://unpkg.com/magic-snowflakes/dist/snowflakes.min.js"></script>
<script>
var sf = new Snowflakes({
color: "#cccccc"
});
</script>
  • 教程如下:

1.打开主题设置-底部设置-网站底部自定义JS代码,各个主题位置不一,请自行查找
2.在输入框输入代码:
3.其中 color: “#cccccc” 中#cccccc为雪花颜色,可以自定义其他css颜色
4.保存刷新网站前台即可查看到雪花效果

Ripro v2美化之表格式弹窗

  • 效果

  • 代码

样式1:改字体颜色,如上图示

<font style="font-size: 16px;"><p class="m-0 text-center text-white"><i class="fa fa-bell mr-1"></i>我们希望您认真阅读以下提示,帮助您快速了解本站情况<sup class="spinner-grow spinner-grow-sm ml-1 small" role="status" aria-hidden="true" style=" width: .6rem; height: .6rem; "></sup></p></font><br>
<font color="#007bff"><ul class="list-group">
<li class="list-group-item">◉ 用QQ一键登录,进入会员中心,开通赞助VIP,方便快捷</li>
<li class="list-group-item">◉ 赞助开通本站包月/包年/终身VIP,所有资源免费使用</li>
<li class="list-group-item">◉ 会员账户仅限会员本人使用,切勿共享,望知悉</li>
<li class="list-group-item">◉ 本站虚拟资源均为Windows及安卓适用,苹果Mac用户切勿赞助</li>
<li class="list-group-item">◉ 最新优惠,赞助VIP限时立减优惠券发放中,前往活动页领取</li>
<li class="list-group-item">◉ 资源均经过站长亲测,无问题才会上架。虚拟资源具有可复制性,您赞助后不支持换货及退款。</li>
</ul></font>
<br>
<center><font style="font-size: 19px;"><a class="badge badge-warning" href="https://mmsto.com/winmac/vipinfo" rel="nofollow noopener noreferrer" target="_blank"><i class="fa fa-diamond mr-1"></i>赞助VIP会员</a></font> 享全站资源免费下载特权
<font style="font-size: 19px;"><a class="badge badge-success" href="https://mmsto.com/winmac/coupon" rel="nofollow noopener noreferrer" target="_blank"> 
	<i class="fa fa-gift mr-1"></i>现在去领券</a></font> 即享立减特惠!</center>

样式二:改字体大小及颜色

<font style="font-size: 15px;"><p class="m-0 text-center text-white"><i class="fa fa-bell mr-1"></i>我们希望您认真阅读以下提示,帮助您快速了解本站情况<sup class="spinner-grow spinner-grow-sm ml-1 small" role="status" aria-hidden="true" style=" width: .6rem; height: .6rem; "></sup></p></font><br>
<font style="font-size:15px;color:#007bff"><ul class="list-group">
<li class="list-group-item">◉ 用QQ一键登录,进入会员中心,开通赞助VIP,方便快捷</li>
<li class="list-group-item">◉ 赞助开通本站包月/包年/终身VIP,享全站资源免费下载特权</li>
<li class="list-group-item">◉ 会员账户仅限会员本人使用,切勿共享,望知悉</li>
<li class="list-group-item">◉ 本站虚拟资源均为Windows及安卓适用,苹果Mac用户切勿赞助</li>
<li class="list-group-item">◉ 最新优惠,赞助VIP限时立减优惠券发放中,前往活动页领取</li>
<li class="list-group-item">◉ 您也可通过签到获取站内币钢镚,累计钢镚可购买自己需要的资源</li>
<li class="list-group-item">◉ 资源均经过站长亲测,无问题才会上架。虚拟资源具有可复制性,您赞助后不支持换货及退款。</li>
</ul></font>
<br>
<center><font style="font-size: 19px;"><a class="badge badge-warning" href="https://mmsto.com/winmac/vipinfo" rel="nofollow noopener noreferrer" target="_blank"><i class="fa fa-diamond mr-1"></i>赞助VIP会员</a></font> 享全站资源免费下载特权
<font style="font-size: 19px;"><a class="badge badge-success" href="https://mmsto.com/winmac/coupon" rel="nofollow noopener noreferrer" target="_blank"> 
	<i class="fa fa-gift mr-1"></i>现在去领券</a></font> 即享立减特惠!</center>

样式3:列表组规则下的背景及颜色更改

<font style="font-size: 15px;"><p class="m-0 text-center text-white"><i class="fa fa-bell mr-1"></i>我们希望您认真阅读以下提示,帮助您快速了解本站情况<sup class="spinner-grow spinner-grow-sm ml-1 small" role="status" aria-hidden="true" style=" width: .6rem; height: .6rem; "></sup></p></font><br>
<ul class="list-group">
<li class="list-group-item list-group-item-success">◉ 用QQ一键登录,进入会员中心,开通赞助VIP,方便快捷</li>
<li class="list-group-item list-group-item-success">◉ 赞助开通本站包月/包年/终身VIP,享全站资源免费下载特权</li>
<li class="list-group-item list-group-item-success">◉ 会员账户仅限会员本人使用,切勿共享,望知悉</li>
<li class="list-group-item list-group-item-success">◉ 本站虚拟资源均为Windows及安卓适用,苹果Mac用户切勿赞助</li>
<li class="list-group-item list-group-item-success">◉ 最新优惠,赞助VIP限时立减优惠券发放中,前往活动页领取</li>
<li class="list-group-item list-group-item-success">◉ 您也可通过签到获取站内币钢镚,累计钢镚可购买自己需要的资源</li>
<li class="list-group-item list-group-item-success">◉ 资源均经过站长亲测,无问题才会上架。虚拟资源具有可复制性,您赞助后不支持换货及退款。</li>
</ul>
<br>
<center><font style="font-size: 19px;"><a class="badge badge-warning" href="https://mmsto.com/winmac/vipinfo" rel="nofollow noopener noreferrer" target="_blank"><i class="fa fa-diamond mr-1"></i>赞助VIP</a></font> 享全站资源免费下载特权
<font style="font-size: 19px;"><a class="badge badge-success" href="https://mmsto.com/winmac/coupon" rel="nofollow noopener noreferrer" target="_blank"> 
	<i class="fa fa-gift mr-1"></i>现在去领券<sup class="spinner-grow spinner-grow-sm ml-1 small" role="status" aria-hidden="true" style=" width: .6rem; height: .6rem; "></sup></a></font> 即享立减特惠!</center>

列表组可选颜色:

<ul class="list-group">
  <li class="list-group-item">A simple default list group item</li>
  <li class="list-group-item list-group-item-primary">A simple primary list group item</li>
  <li class="list-group-item list-group-item-secondary">A simple secondary list group item</li>
  <li class="list-group-item list-group-item-success">A simple success list group item</li>
  <li class="list-group-item list-group-item-danger">A simple danger list group item</li>
  <li class="list-group-item list-group-item-warning">A simple warning list group item</li>
  <li class="list-group-item list-group-item-info">A simple info list group item</li>
  <li class="list-group-item list-group-item-light">A simple light list group item</li>
  <li class="list-group-item list-group-item-dark">A simple dark list group item</li>
</ul>

对应颜色组:

参考链接:https://v4.bootcss.com/docs/components/list-group/

Ripro v2美化折之我的会员内页加优惠通知条

  • 通知文件

https://www.123pan.com/s/SuA9-5pFD 提取码:PVol

将下载的通知文件解压,把notee.php放置到:你的域名/wp-content/themes/ripro-v2/文件夹下

  • 代码修改

找到:你的域名/wp-content/themes/ripro-v2/pages/user/vip.php

在38行添加如下代码:

<?php include (TEMPLATEPATH . '/notee.php'); ?>
<br>
  • 刷新网页即生效。这时上下边距不对称,不好看,我们优化下我的会员页面的排版布局
  • 更改代码,缩小开通会员文字说明部分的上下空白:

你的域名/wp-content/themes/ripro-v2/assets/css/app.css,找到第86行,更改如下:

ul, ol, dl {
    margin: 10px 0;
    padding-left: 30px;
}

接着搜索.card-footer,找到第7748行,更改如下:

.card-footer {
    padding: 1.2rem 1.5rem;
    background-color: #fff;
    border-top: .0625rem solid rgba(231, 234, 243, .7)
}

更改代码,修改我的套餐上下左右边距值
你的域名/wp-content/themes/ripro-v2/assets/bootstrap/css/bootstrap.min.css,搜索.p-4,修改其下边距值如下:

.p-4{padding:1.5rem 1.5rem 0.2rem 1.5rem!important}

其原始值是:

.p-4{padding:1.5rem!important}
  • 修改完成,刷新下app.css及bootstrap.min.css的CDN缓存即可

Ripro v2美化之文章内页加滚动通知栏

  • 通知文件:

https://www.123pan.com/s/SuA9-LpFD 提取码:XX5n

将下载的通知文件解压,把wanote.php放置到:你的域名/wp-content/themes/ripro-v2/文件夹下

  • 代码修改:

找到:你的域名/wp-content/themes/ripro-v2/single.php

在17行添加如下代码:

<?php include (TEMPLATEPATH . '/wanote.php'); ?>
<br>
  • 刷新网页即生效。

wordpress自定义Html实现自动翻转宣传,侧边小工具适用

  • 效果
  • 代码
<section id="custom_html-2" class="widget_text widget widget_custom_html mar16-b"> 
<meta charset="utf-8"> 
<!-- <p  align="left"  class="widget-title l1 box-header">欢迎访问SP资源网</p>--> 
<div class="textwidget custom-html-widget"> <aside id="php_text-8" class="widget php_text wow fadeInUp" data-wow-delay="0.3s"> 
<div class="textwidget widget-text"> 
<style type="text/css">
#container-box-1{color:#526372;text-transform:uppercase;width:100%;font-size:16px; line-height:50px;text-align:center}
#flip-box-1{overflow:hidden;height:50px}
#flip-box-1 div{height:50px}#flip-box-1>div>div{color:#fff;display:inline-block;text-align:center;border-radius: 5px;height:50px;width:100%}
#flip-box-1 div:first-child{animation:show 8s linear infinite}
.flip-box-1-1{background-color:#8811ff}
.flip-box-1-2{background-color:#FF7E40}
.flip-box-1-3{background-color:#383838}
.flip-box-1-4{background-color:#007bff}
 .flip-box-1-5{background-color:#008b5d}
.flip-box-1-6{background-color:#ff5b5b}@keyframes show{0%{margin-top:-300px}5%{margin-top:-250px}16.666%
{margin-top:-250px}21.666%{margin-top:-200px}33.332%{margin-top:-200px}38.332%{margin-top:-150px}49.998%
{margin-top:-150px}54.998%{margin-top:-100px}66.664%{margin-top:-100px}71.664%{margin-top:-50px}83.33%
{margin-top:-50px}88.33%{margin-top:0px}99.996%{margin-top:0px}100%{margin-top:300px}}</style>
<div id="container-box-1"> <div class="container-box-1-1">开通VIP会员免费下载所有资源</div> 
<div id="flip-box-1"><div><div class="flip-box-1-1">精品资源</div> </div>
<div><div class="flip-box-1-2">永久更新</div></div> <div><div class="flip-box-1-3">内容全面</div></div>
<div> <div class="flip-box-1-4">无限下载</div></div> <div><div class="flip-box-1-5">优质软件</div></div> 
<div><div class="flip-box-1-6">站长亲测</div></div> <div><div class="flip-box-1-1">会员免费</div></div> </div>
<div class="container-box-1-2">限时特价,终身VIP券后仅需399!</div></div></div> <div class="clear"></div> </aside></div> </section>

小结

这也算是老刘从菜鸟开始建网站到自己一步步摸索,总结出来的代码,如果你也喜欢Wordpress建站,可以拿去用哦

「点点赞赏,手留余香」

还没有人赞赏,快来当第一个赞赏的人吧!

老刘一号给老刘一号打赏
×
予人玫瑰,手有余香
  • 66
  • 88
  • 99
  • 188
  • 199
66
支付
版权声明:
1、本站所有文章内容均来源于互联网,我站仅作收集整理,VIP/积分赞助/打赏等费用仅为维持网站正常运转;
2、本站部分文章、图片不代表本站立场,并不代表本站赞同其观点和对其真实性负责;
3、本站一律禁止以任何方式发布或转载任何违法的相关信息,访客发现请向站长举报;
4、本站资源大多存储在云盘,如发现链接失效,请联系我们,我们会第一时间更新;
5、本站分享的高质量高清写真图集,出镜模特均为成年女性正常写真无R18内容,仅限用于摄影爱好者提供素材与鉴赏学习;
6、本站所有文章、图片、资源等均为收集自互联网,版权归原作者所有。仅作为个人学习、研究以及欣赏!请在下载后24小时内删除。共同维护和谐健康的互联网!如果您发现本站上有侵犯您的权益的作品,请与我们取得联系,我们会及时删除或者修改。
老刘一号
老刘一号 关注:1    粉丝:0 最后编辑于:2023-06-05
老刘弹互联网-深扒互联网底裤,还原互联网真相。

发表评论

扫一扫二维码分享
×