在主题目录 func.php 文件添加如下代码。
复制代码
/*新文章发布角标 blog.zbiwl.com*/
function add_zbfox_new_post_label($title, $id) {
if (!is_admin() && !is_single()) {
$post_time = get_the_time('U', $id);
if (time() - $post_time <= 24 * 60 * 60) {
$title .= ' <div class="zbfox_new_post_label">NEW</div>';
}
}
return $title;
}
add_filter('the_title', 'add_zbfox_new_post_label', 10, 2);
添加微语页面
添加微语页面
美化教程1、首先在子比主题目录的functions.php里面加入以下代码://微语 add_action('init', 'my_custom_init'); function my_custom_...
为您的网站添加网站底部美化代码 支持任意网站
为您的网站添加网站底部美化代码 支持任意网站
<style> .github-badge { display: inline-block; border-radius: 4px; text-shadow: none; font-siz...