子比主题 – 文章卡片下载按钮样式美化
给子比主题卡片样式下面加一个下载按钮样式,非常美观,给自己的子比主题去加一个吧,这个非常实用,这个代码是扒mac站长的一个美化,所以我分享给大家免费使用代码部署
一共三个代码,跟着我的步骤走不会有问题,话不多说直接开始!
定位:/wp-content/themes/zibll/inc/functions/zib-posts-list.php文件,然后搜下面的代码
zib_get_posts_list_meta($show_author = true, $is_card = false, $post = null)
$get_permalink = get_permalink();//添加文章链接
定位:/wp-content/themes/zibll/inc/functions/zib-posts-list.php文件,然后搜下面的代码
<div class="item-meta muted-2-color flex jsb ac">如下图,如下代码部署第二块代码!
$html = '<a class="down" target="_blank" href="' . $get_permalink . '">下载</a>';//添加下载按钮
直接丢到:子比主题–>>自定义CSS样式即可!
/*文章卡片下载按钮 tfbkw.com*/
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;
}
页:
[1]