文章底部的版權聲明是一個持久不衰的話題,這次wordpress區塊分享的漸變背景版權聲明卡片可以放在日志頁底部,里面還有幾個快捷鏈接,方便您的訪客快速找到自己常用的鏈接。
- 代碼來源:詳情
卡片長這樣:

如何使用?
方案一、
將下方代碼復制到您的主題根目錄下的functions.php
的<?php
下面。
//在所有文章底部添加自定義內容
function add_after_post_content($content) {
if(!is_feed() && !is_home() && is_singular() && is_main_query()) {
$content .= '
<style type="text/css">
.content-copyright {
color: #fff !important;
display: flex;
justify-content: center;
flex-flow: column;
margin-top: 20px;
padding: 20px;
border-radius: 6px;
position: relative;
/*background-image: linear-gradient(-90deg, #29bdd9 0%, #276ace 100%);*/
background-image: linear-gradient(120deg, #48c6ef 0%, #6f86d6 100%);
box-shadow: 0 0 0.0625rem 0 rgba(8, 11, 14, .06), 0 0.1875rem 0.1875rem -0.0625rem rgba(8, 11, 14, .1), 0 0 0.1875rem 0 rgba(8, 11, 14, .02);
text-align: center;
font-size: 14px !important;
margin-bottom: 0 !important;
}
.content-copyright a {
color: #fff !important;
border-bottom: 0px !important;
}
.content-copyright p {
font-size: 14px !important;
margin: .5em 0;
}
@media screen and (max-width: 768px) {
.content-copyright {
margin: 12px -12px 0;
}
}
</style>
<div class="content-copyright">
<p>有些資源有時效性,且用且珍惜。</p>
<p>文章均為<a href="#">Npcink</a>整理分享,僅作個人學習使用,轉載請注明鏈接,謝謝!</p>
<p>
<a href="#" target="_blank" rel="noopener noreferrer">N</a>| <a
href="#" target="_blank" rel="noopener noreferrer">N</a>| <a
href="#" target="_blank" rel="noopener noreferrer">N</a>| <a
href="#" target="_blank" rel="noopener noreferrer">N</a>
</p>
</div>
';
}
return $content;
}
add_filter('the_content', 'add_after_post_content');
方案二、
點擊下方的Demo按鈕,右擊鼠標查看源代碼,根據代碼注釋復制代碼到自己需要的地方,例如古登堡的HTML區塊或是小工具里面的“自定義HTML”,另外,記得看代碼注釋哦(。???)ノ
感謝站長??
謝謝站長分享
WO YAOKAN A