RiPro-V2主题右侧导航美化代码

2022-03-31 0 3,756

RiPro-V2右侧导航我感觉太丑了,我更喜欢rizhuti-v2的样式,简简洁干净,样式也好看,所以我们把RiPro-V2右侧导航替换一下,下面先看看效果图。

注意:本教程是在原主题上修改,后续将整合到子主题,可自由升级!

RiPro-V2美化效果:

RiPro-V2主题右侧导航美化代码

RiPro-V2主题美化教程:

1.打开“/wp-content/themes/ripro-v2/template-parts/global/footer-rollbar.php”将代码全部替换为如下代码

<div class="rollbar">
	<?php $rollbar = _cao('site_footer_rollbar');
	if ( !empty($rollbar) && is_array($rollbar) ) : ?>
	<ul class="actions">
	<?php foreach ($rollbar as $item) : ?>
		<li>
			<?php $target = (empty($item['is_blank'])) ? '' : ' target="_blank"' ;?>
			<a<?php echo $target;?> href="<?php echo $item['href'];?>" rel="external nofollow"  rel="nofollow noopener noreferrer"><i class="<?php echo $item['icon'];?>"></i><span><?php echo $item['title'];?></span></a>
		</li>
		<?php endforeach;?>
	</ul>
	<?php endif;?>
	<div class="rollbar-item back-to-top" title="返回顶部">
		<i class="fas fa-chevron-up"></i>
	</div>
</div>

注意:返回顶部失效请将[class="rollbar-item"]改为[class="rollbar-item back-to-top"]

2.打开“wp-content/themes/ripro-v2/assets/css/app.css”搜索

/*rollbar*/

3.将上述代码中的rollbar样式段全部删除(RiPro-V2 V3.5大约在6509-6631行,其他版本可能位置有所变化),再添加如下的css样式

/*rollbar*/
.rollbar {
    position: fixed;
    right: 20px;
    bottom: 10%;
    z-index: 99;
    display: none;
    width: 45px;
}

.rollbar .actions {
    position: relative;
    width: 100%;
    -webkit-box-shadow: 0 0 10px rgb(0 0 0 / 0.1);
    box-shadow: 0 0 10px rgb(0 0 0 / 0.1);
    border-radius: 5px;
    list-style-type: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    line-height: 45px;
}

.rollbar .actions li {
    position: relative;
    background: #fff;
}

.rollbar .actions li+li {
    border-top: solid #eee 1px;
}

.rollbar .actions li:hover {
    opacity: .8;
    -webkit-transition: all .2s;
    -o-transition: all .2s;
    transition: all .2s;
}

.rollbar .actions li>a {
    display: block;
    padding: 8px 0;
    cursor: pointer;
    position: relative;
    border: 0;
    opacity: 1;
    width: 100%;
    text-align: center;
    height: auto;
}

.rollbar .actions li>a .spinner-grow {
    position: absolute;
    left: 5px;
    top: -15px;
    width: 8px;
    height: 8px;
    background-color: #4CAF50;
}

.rollbar .actions li a.burger:before, .rollbar .actions li a.burger:after {
    display: none;
}

.rollbar .actions li>a>i {
    font-size: 18px;
    background-image: -o-linear-gradient(top, #343a40 0, #343a40 100%);
    background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #343a40), to(#343a40));
    background-image: linear-gradient(to bottom, #fc4065 0, #fc4065 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: block;
    margin-bottom: 10px;
}

.rollbar .actions li>a>span {
    font-size: 12px;
    color: #555;
    padding: 0 4px;
    letter-spacing: 2px;
    display: block;
    text-align: center;
    line-height: 1.2;
    position: relative;
}

.rollbar .rollbar-item {
    position: relative;
    margin-top: 20px;
    border-radius: 5px;
    background-color: #ffffff;
    color: #555;
    text-align: center;
    cursor: pointer;
    -webkit-transition: all .3s ease-in-out;
    -o-transition: all .3s ease-in-out;
    transition: all .3s ease-in-out;
    -webkit-box-shadow: 0 0 10px rgb(0 0 0 / 0.1);
    box-shadow: 0 0 10px rgb(0 0 0 / 0.1);
    line-height: 45px;
    height: 45px;
}

.rollbar .rollbar-item i {
    line-height: 45px;
}

.rollbar .rollbar-item:hover {
    opacity: .8;
    -webkit-transition: all .2s;
    -o-transition: all .2s;
    transition: all .2s;
}

@media (max-width: 767px) {
    .rollbar {
        display: none!important;
        opacity: 0;
    }
}

@-webkit-keyframes flashing {
    0% {
        opacity: 1
    }

    45% {
        opacity: 0
    }

    90% {
        opacity: 1
    }
}

@keyframes flashing {
    0% {
        opacity: 1
    }

    45% {
        opacity: 0
    }

    90% {
        opacity: 1
    }
}

4.打开“wp-content/themes/ripro-v2/inc/options/admin-options.php”搜索“底部设置”(RiPro-V2 V3.5大约在2518-2579行,其他版本可能位置有所变化) 替换为如下代码:

        // rollbar
        array(
            'id'      => 'site_footer_rollbar',
            'type'    => 'group',
            'title'   => '全站右下角菜单(返回顶部+)',
            'max'     => '10',
            'fields'  => array(
                array(
                    'id'      => 'title',
                    'type'    => 'text',
                    'title'   => '菜单名称',
                    'default' => '首页',
                ),
                array(
                    'id'    => 'icon',
                    'type'  => 'icon',
                    'title' => '图标',
                ),
                array(
                    'id'      => 'is_blank',
                    'type'    => 'switcher',
                    'title'   => '新窗口打开',
                    'default' => true,
                ),
                array(
                    'id'      => 'href',
                    'type'    => 'text',
                    'title'   => '链接地址',
                    'desc'    => '比如用户中心,填写' . home_url('/user'),
                    'default' => home_url(),
                ),

            ),
            'default' => array(
                array(
                    'title' => '客服',
                    'icon'  => 'fab fa-qq',
                    'href'  => 'http://wpa.qq.com/msgrd?v=3&uin=963020001&site=qq&menu=yes',
                ),
                array(
                    'title' => '群聊',
                    'icon'  => 'far fa-user-graduate',
                    'href'  => 'https://jq.qq.com/?_wv=1027&k=uFqQjYHi',
                ),
                array(
                    'title' => '会员',
                    'icon'  => 'fa fa-diamond',
                    'href'  => home_url('/user?action=vip'),
                ),
                array(
                    'title' => '我的',
                    'icon'  => 'far fa-user',
                    'href'  => home_url('/user'),
                ),
            ),
        ),

5.操作完成后去“底部设置”→“重置选区”(注意备份资料),完成后重新设置一下,到前台刷新即可看到效果!如果没有更新,请清除浏览器缓存或CDN缓存。

收藏 (0) 打赏

感谢您的支持,我会继续努力的!

打开微信扫一扫,即可进行扫码打赏哦,分享从这里开始,精彩与您同在,感谢您的支持!
点赞 (0)

版权声明:
1.本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。站长邮箱:admin2@111.com

2.本站几乎所有资源均搜集于网络,仅供学习参考,不得进行任何商业用途,否则产生的一切后果将由使用者本人承担!本站仅仅提供一个观摩学习与交流的平台,将不保证所提供资源的完整性,也不对任何资源负法律责任。所有资源请在下载后24小时内删除。如果您觉得满意,请购买正版,以便更好支持您所喜欢的软件或书籍

3.因素材收集于网络,部分源码、视频中包含有无关本站的联系方式,请大家仔细甄别,谨防上当受骗。因此受到的财产损失,本站概不负责。

4.教程视频中所表达的仅为讲师自己观点,大家需要有独立理解能力,自行甄别真伪。

独立云资源 wordpress RiPro-V2主题右侧导航美化代码 https://www.duliyun.cn/989.html

这是一个优质的资源库

常见问题
  • 本站所有资源版权均属于原作者所有,这里所提供资源均只能用于参考学习用,请勿直接商用。若由于商用引起版权纠纷,一切责任均由使用者承担。更多说明请参考 VIP介绍。
查看详情
  • 最常见的情况是下载不完整: 可对比下载完压缩包的与网盘上的容量,若小于网盘提示的容量则是这个原因。这是浏览器下载的bug,建议用百度网盘软件或迅雷下载。 若排除这种情况,可在对应资源底部留言,或联络我们。
查看详情
  • 对于会员专享、整站源码、程序插件、网站模板、网页模版等类型的素材,文章内用于介绍的图片通常并不包含在对应可供下载素材包内。这些相关商业图片需另外购买,且本站不负责(也没有办法)找到出处。 同样地一些字体文件也是这种情况,但部分素材会在素材包内有一份字体下载链接清单。
查看详情
  • 如果您已经成功付款但是网站没有弹出成功提示,请联系站长提供付款信息为您处理。
查看详情
  • 源码视频等素材属于虚拟商品,具有可复制性,可传播性,一旦授予,不接受任何形式的退款、换货要求。请您在购买获取之前确认好 是您所需要的资源.
查看详情

相关文章

官方客服团队

为您解决烦忧 - 24小时在线 专业服务

RiPro-V2主题右侧导航美化代码