7B2首页文章标题大变身,美翻你的访客眼球

为了进一步提升网站首页的吸引力和阅读体验,我们对7B2主题的首页文章标题进行了全面美化升级。这次升级旨在通过精心设计的视觉效果和优化的排版布局,让每一篇文章的标题都能脱颖而出,成为引导访客深入探索的强大引力。

主要美化特点包括

  1. 字体与字号优化:我们精选了易读性高且具有美感的字体,并适当调整了标题的字号大小,确保在不同设备和屏幕尺寸上都能呈现出最佳的视觉效果。这样,无论用户是通过电脑、平板还是手机访问您的网站,都能轻松阅读并理解文章标题。
  2. 颜色搭配与对比:为了突出文章标题的重要性,我们运用了鲜明的颜色搭配和强烈的对比效果。通过为标题设置独特的颜色或添加背景色块,使其在众多内容中脱颖而出,吸引用户的眼球。同时,我们也注重保持整体页面风格的和谐统一,确保标题美化不会破坏网站的整体美感。
  3. 图标与装饰元素:为了增加文章标题的趣味性和吸引力,我们在部分标题旁添加了相关图标或装饰元素。这些元素不仅丰富了标题的表现形式,还能帮助用户快速了解文章的主题或内容类型,提升阅读效率。
  4. 悬停效果(Hover Effect):为了增强用户体验,我们为文章标题添加了悬停效果。当用户将鼠标悬停在标题上时,会出现一些额外的视觉效果(如颜色变化、阴影效果等),进一步吸引用户的注意力并激发点击欲望。
  5. 响应式设计:我们深知不同设备和屏幕尺寸对用户体验的重要性,因此本次美化升级特别注重了响应式设计。无论用户是通过何种设备访问您的网站,文章标题都能保持最佳的显示效果和阅读体验。

通过这次7B2主题首页文章标题的美化升级,我们相信您的网站将能够吸引更多用户的关注,提升网站的流量和转化率。同时,这也将为您的访客提供更加舒适、愉悦的阅读体验,增强他们对网站的粘性和忠诚度。

演示效果

图片[1]-7B2首页文章标题大变身,美翻你的访客眼球-派克资源

首先找到b2主题或者子主题下面的/themes/b2child/Modules/Templates/Modules/posts.php搜索代码modules-title-box然后对应下面的代码添加

[content_hide]

        
        // $desc = in_array('desc',$post_meta);
        $randomNumber = rand(1, 7);
        //$desc = in_array('desc',$post_meta);
        $html .= '<div class="modules-title-box" id="biaotibg'.$randomNumber.'">';

[/content_hide]

图片[2]-7B2首页文章标题大变身,美翻你的访客眼球-派克资源

其次/b2child/Modules/Templates/Modules/Products.php搜索代码modules-title-box然后对应下面的代码添加

[content_hide]

        $randomNumber = rand(1, 7);
        $html .= '<div class="shop-box-title"><div class="modules-title-box" id="biaotibg'.$randomNumber.'">';

[/content_hide]

图片[3]-7B2首页文章标题大变身,美翻你的访客眼球-派克资源

第三步找到b2主题或者子主题下面的/Modules/Templates/Header.php的 <style>与.header-banner{之间添加下面代码

[content_hide]

#biaotibg1 {
    
    height: 39px;
    background: url(https://www.laipang.com/wp-content/themes/b2child/pic/goods-title.png) no-repeat;
    background-position: 0 0;
    
    position: relative;
    margin-left: -10px;
    margin-right: 20px;
}
#biaotibg2 {
    
    height: 39px;
    background: url(https://www.laipang.com/wp-content/themes/b2child/pic/goods-title.png) no-repeat;
    background-position: 0 -55px;
     
    position: relative;
    margin-left: -10px;
    margin-right: 20px;
}
#biaotibg3 {
    
    height: 39px;
    background: url(https://www.laipang.com/wp-content/themes/b2child/pic/goods-title.png) no-repeat;
    background-position: 0 -385px;
     
    position: relative;
    margin-left: -10px;
    margin-right: 20px;
}
#biaotibg4 {
    
    height: 39px;
    background: url(https://www.laipang.com/wp-content/themes/b2child/pic/goods-title.png) no-repeat;
    background-position: 0 -165px;
     
    position: relative;
    margin-left: -10px;
    margin-right: 20px;
}
#biaotibg5 {
    
    height: 39px;
    background: url(https://www.laipang.com/wp-content/themes/b2child/pic/goods-title.png) no-repeat;
    background-position: 0 -220px;
     
    position: relative;
    margin-left: -10px;
    margin-right: 20px;
}
#biaotibg6 {
    
    height: 39px;
    background: url(https://www.laipang.com/wp-content/themes/b2child/pic/goods-title.png) no-repeat;
    background-position: 0 -275px;
     
    position: relative;
    margin-left: -10px;
    margin-right: 20px;
}
#biaotibg7 {
    
    height: 39px;
    background: url(https://www.laipang.com/wp-content/themes/b2child/pic/goods-title.png) no-repeat;
    background-position: 0 -330px;
     
    position: relative;
    margin-left: -10px;
    margin-right: 20px;
}
.modules-title-box .module-title {
    padding-left: 45px;
    padding-top: 8px;
}

[/content_hide]

最后一步

在子主题下functions.php加载刚刚修改的这些文件,如果子主题没有这三个文件,对应 从b2里面复制到子主题下面

[content_hide]

require_once get_theme_file_path('/Modules/Templates/Header.php');
require_once get_stylesheet_directory() . '/Modules/Templates/Modules/Posts.php';
require_once get_stylesheet_directory() . '/Modules/Templates/Modules/Products.php';

[/content_hide]

文章版权声明 1、本网站名称:派克资源
2、本站永久网址:https://www.pknn.net
3、本网站的文章部分内容可能来源于网络,仅供大家学习与参考,如有侵权,请联系站长进行删除处理。
4、本站一切资源不代表本站立场,并不代表本站赞同其观点和对其真实性负责。
5、本站一律禁止以任何方式发布或转载任何违法的相关信息,访客发现请向站长举报
6、本站资源大多存储在云盘,如发现链接失效,请联系我们我们会第一时间更新。
© 版权声明
THE END
喜欢就支持一下吧
点赞0 分享