0°

柒比贰美化-首页仿优设四格界面修改代码

注意:1.建议使用启用子主题的方式修改,以便添加css代码2.后附下载地址,下载的内容是inc文件夹下functions-templates.php的代码,代码中添加了顶部的菜单双栏代码以及菜单距离往右的css代码3.付费后可代调试一次!非我发的代码报错的不予以调试

来源于:

https://www.6fwq.com/1272.html

柒比贰主题首页仿优设四格界面修改代码

效果如下:

柒比贰美化-首页仿优设四格界面修改代码

注意:

1.建议使用启用子主题的方式修改,以便添加css代码

2.后附下载地址,下载的内容是inc文件夹下functions-templates.php的代码,代码中添加了顶部的菜单双栏代码以及菜单距离往右的css代码

注意:关于价格我先说一句。。。免费,免费,免费!(庆祝四月底新版来临)    随便看,可提供代改服务!!(代改收费)

转载请留原文链接!这句很重要!

修改代码:

位置:seven主题目录下inc文件夹functions-templates.php(//首页专题部分替换)

修改内容:

//首页专题
if ( ! function_exists( ‘home_collection_7b2’ ) ) {
function home_collection_7b2(){

$collections_show_mobile = zrz_get_display_settings(‘collections’);
$collections_show = isset($collections_show_mobile[‘collections_show_index’]) ? $collections_show_mobile[‘collections_show_index’] : true;
if(!$collections_show) return;
$collections_show_mobile = isset($collections_show_mobile[‘text’]) ? $collections_show_mobile[‘text’] : array();
$arr = array();
$ids = array();
$thumb = ”;
if($collections_show_mobile){
$row = explode(PHP_EOL, $collections_show_mobile );
if($row && is_array($row) && !empty($row)){
foreach ($row as $val) {
$val = DeleteHtml($val);
$list = explode( “|”, $val );
$arr[$list[0]] = $list[1];
$ids[] = $list[0];
}
}
}
$taxonomies = get_terms( array(
‘taxonomy’ => ‘collection’,
‘hide_empty’ => false,
‘number’=>6,
‘include’=>$ids,
‘orderby’=>’include’
) );
$html = ”;
if ( !empty($taxonomies) ) {
$html = ‘<div class=”home-first-screen”>
<div class=”parts row”>
<div class=”col-sm-6 col-md-3 part-first”>
<div class=”home-first-part home-menus”>
<ul>
<li><a href=”/category/resource-area/quality-software” target=”_blank”><svg class=”icon” aria-hidden=”true”> <use xlink:href=”#iconzhongyaruanjian1″>use> svg><span>软件下载span>a>li>
<li><a href=”/category/resource-area/learning-materials” target=”_blank”><svg class=”icon” aria-hidden=”true”> <use xlink:href=”#iconxuexiziliao”>use> svg><span>学习资料span>a>li>
<li><a href=”/category/resource-area/film_music” target=”_blank”><svg class=”icon” aria-hidden=”true”> <use xlink:href=”#icondianying”>use> svg><span>影视音乐span>a>li>
<li><a href=”/category/resource-area/network-source-code” target=”_blank”><svg class=”icon” aria-hidden=”true”> <use xlink:href=”#iconruanjianbanben”>use> svg><span>网络源码span>a>li>
<li><a href=”/category/homework-assistance” target=”_blank”><svg class=”icon” aria-hidden=”true”> <use xlink:href=”#icontubiaozhizuomoban-“>use> svg><span>作业帮辅span>a>li>
<li><a href=”/category/resource-area/server-recommendation” target=”_blank”><svg class=”icon” aria-hidden=”true”> <use xlink:href=”#icon-“>use> svg><span>服务器推荐span>a>li>
ul>
div>
div>

<div class=”col-sm-6 col-md-3″>
<div class=”home-first-part home-topics”>
<h2 class=”hf-title”><strong><a href=”https://www.6fwq.com/category/jiaocheng/server-tutorial” target=”_blank”>教程专区a>strong><a href=”https://www.6fwq.com/category/jiaocheng/server-tutorial” target=”_blank” class=”more”>morea>h2>
<div class=”items”>
<div class=”row”>
<div class=”col-xs-6″>
<a href=”https://www.6fwq.com/328.html” target=”_blank”><span class=”thumb” style=”background-image:url(https://www.6fwq.com/wp-content/uploads/bfi_thumb/107e48c1c352c2-6oa0farcyrwuk7tso8u2m2eu0e8wy7719w2wkqlxfl4.png)”><img src=”https://www.6fwq.com/wp-content/uploads/bfi_thumb/107e48c1c352c2-6oa0farcyrwuk7tso8u2m2eu0e8wy7719w2wkqlxfl4.png” alt=”thumb”>span><strong class=”title”>非插件禁用古滕堡strong>a>
div>
<div class=”col-xs-6″>
<a href=”https://www.6fwq.com/926.html” target=”_blank”><span class=”thumb” style=”background-image:url(https://www.6fwq.com/wp-content/uploads/bfi_thumb/1edd3c9511851d-6o91cpmj7fuxnr90cmgumpcobtxmlf38rzydbsrqrs8.png)”><img src=”https://www.6fwq.com/wp-content/uploads/bfi_thumb/1edd3c9511851d-6o91cpmj7fuxnr90cmgumpcobtxmlf38rzydbsrqrs8.png” alt=”thumb”>span><strong class=”title”>三步搞定阿里云端口strong>a>
div>
div>
div>
div>
div>
<div class=”col-sm-6 col-md-3″>
<div class=”home-first-part home-subjects”>
<h2 class=”hf-title”><strong><a href=”/bubble” target=”_blank”>论坛交流a>strong><a href=”/bubble” target=”_blank” class=”more”>morea>h2>
<div class=”items”>
<div class=”row”>
<div class=”col-xs-6″>
<a href=”https://www.6fwq.com/bubbles/daily-punch-card” target=”_blank”><span class=”thumb” style=”background-image:url(https://www.6fwq.com/wp-content/themes/seven/img/daka.png)”><img src=”https://www.6fwq.com/wp-content/themes/seven/img/daka.png” alt=”thumb”>span><strong class=”title”>签到获取积分strong>a>
div>
<div class=”col-xs-6″>
<a href=”https://www.6fwq.com/bubbles/download-area” target=”_blank”><span class=”thumb” style=”background-image:url(https://www.6fwq.com/wp-content/themes/seven/img/cuidan.png)”><img src=”https://www.6fwq.com/wp-content/themes/seven/img/cuidan.png” alt=”thumb”>span><strong class=”title”>下载区快速催单strong>a>
div>

div>
div>
div>
div>
<div class=”col-sm-6 col-md-3″>
<div class=”home-first-part home-course”>
<h2 class=”hf-title”><strong><a href=”https://www.6fwq.com/announcement” target=”_blank”>网站公告a>strong><a href=”https://www.6fwq.com/announcement” target=”_blank” class=”more”>morea>h2>
<div class=”courses”>
<div class=”course-items”>
<ul>
<li><a href=”https://www.6fwq.com/announcement” target=”_blank”><strong>关于本站strong><span>本站说明span>a>li>
<li><a href=”https://www.6fwq.com/announcement/361.html” target=”_blank”><strong>下载说明strong><span>兑换素材span>a>li>
<li><a href=”#” target=”_blank”><strong>素材发布strong><span>上传规则span>a>li>
<li><a href=”https://www.6fwq.com/bubbles/fankui” target=”_blank”><strong>意见反馈strong><span>意见反馈span>a>li>
ul>
div>
div>
div>
div>
div>’;

$html .= ‘ul>div>’;
}
echo $html;
unset($html);
}
}

css代码:

见记事本内容

柒比贰专题修改

提取码:;解压码:

下载

以上调试完成后图片显示会不正确,那是因为没有引用阿里巴巴矢量彩色图标库,引用方法参照:

wordpress或网站中阿里图标库引用彩色图标的方法介绍(精)

038

0 条回复 A 作者 M 管理员
    所有的伟大,都源于一个勇敢的开始!
欢迎您,新朋友,感谢参与互动!欢迎您 {{author}},您在本站有{{commentsCount}}条评论