本页目录

文章底部的版权声明是一个持久不衰的话题,这次 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');方案二、