看图:
本教程一共有三步,两行php代码和一个css代码
1、PHP代码
下面的PHP代码放到子比文件:/wp-content/themes/zibll/inc/functions/zib-posts-list.php
的大概
下面代码加入上图红色位置
$get_permalink = get_permalink();//添加文章链接
2、PHP代码
下面的PHP代码放到子比文件:/wp-content/themes/zibll/inc/functions/zib-posts-list.php
的大概
下面代码加入上图红色位置
$html = '<a class="down" target="_blank" href="' . $get_permalink . '"><span class="but jb-vip1 radius">获取资源</span></a>';//添加下载按钮
CSS代码,直接放到子比主题=>>自定义CSS样式即可!
/*文章卡片下载按钮 youyuanku.net*/
a.down {
display: inline-block;
width: 100%;
height: 30px;
line-height: 30px;
border-radius: 15px;
background: linear-gradient(to right, #4f6dee, #67bdf9);
color: #fff;
text-align: center;
cursor: pointer
text-shadow: none;
border: none;
outline: none;
box-shadow: none;
padding: 0;
margin: 0;
}
本站代码模板仅供学习交流使用请勿商业运营,严禁从事违法,侵权等任何非法活动,否则后果自负!
© 版权声明
THE END
暂无评论内容