原帖地址
https://www.zibll.com/forum-post/37897.html#article
效果图展示
观赏性以及美观性加强,更新文章的日期一目了然,看着更加美观
找到主题文件:/wp-content/themes/zibll/inc/functions/zib-posts-list.php
然后在里面搜索 :获取卡片模式的文章列表 如图
这整段代码替换以下代码即可:
//获取卡片模式的文章列表
function zib_posts_mian_list_card($args = array())
{
//准备必要参数
//文章右上角显示时间
$zbbox_date = get_the_date('Y-m-d');
$date = get_the_date('m-d');
//文章右上角显示时间
$graphic = zib_get_posts_thumb_graphic();
$title = zib_get_posts_list_title();
$badge = zib_get_posts_list_badge($args);
$meta = zib_get_posts_list_meta(empty($args['no_author']), true);
$class = 'posts-item card ajax-item';
$style = _pz('list_card_option', '', 'style');
$class .= $style && $style != 'null' ? ' ' . $style : '';
$html = '';
$html .= '<posts class="' . $class . '">';
//文章右上角显示时间
$html .= '<div class="item-body">';
$html .= '<div class="tools">';
$html .= '<div class="circle">';
$html .= '<span class="red zbbox"></span>';
$html .= '</div>';
$html .= '<div class="circle">';
$html .= '<span class="yellow zbbox"></span>';
$html .= '</div>';
$html .= '<div class="circle">';
$html .= '<span class="green zbbox"></span>';
$html .= '</div>';
$html .= '<span class="zbbox_soft_time" style="color: #7772ff; text-align: right;">';
$html .= '<svg t="1718343757391" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6786" width="20" height="20">';
$html .= '<path d="M690.176 843.776l239.616-358.4c10.24-14.336 6.144-32.768-8.192-43.008-4.096-4.096-10.24-6.144-16.384-6.144H716.8v-225.28c0-16.384-14.336-30.72-30.72-30.72-10.24 0-20.48 6.144-24.576 14.336L421.888 552.96c-10.24 14.336-6.144 32.768 8.192 43.008 4.096 4.096 10.24 6.144 16.384 6.144H634.88v225.28c0 16.384 14.336 30.72 30.72 30.72 10.24 0 20.48-6.144 24.576-14.336z" p-id="6787" fill="#17abe3"></path>';
$html .= '<path d="M204.8 231.424h204.8c34.816 0 61.44 26.624 61.44 61.44s-26.624 61.44-61.44 61.44H204.8c-34.816 0-61.44-26.624-61.44-61.44s26.624-61.44 61.44-61.44z m0 491.52h204.8c34.816 0 61.44 26.624 61.44 61.44s-26.624 61.44-61.44 61.44H204.8c-34.816 0-61.44-26.624-61.44-61.44s26.624-61.44 61.44-61.44z m-81.92-245.76h163.84c34.816 0 61.44 26.624 61.44 61.44s-26.624 61.44-61.44 61.44H122.88c-34.816 0-61.44-26.624-61.44-61.44s26.624-61.44 61.44-61.44z" opacity=".3" p-id="6788" fill="#17abe3"></path>';
$html .= '</svg>';
$html .= '</span>';
//文章右上角显示时间
$html .= '<div class="zbbox_posts_wap">' . $zbbox_date . '</div>';//电脑
$html .= '<div class="wppc">' . $date .'</div>';
$html .= '</div>';
$html .= $graphic;
$html .= $title;
$html .= $badge;
$html .= $meta;
$html .= '</div>';
$html .= '</posts>';
return $html;
}
然后添加以下自定义CSS代码到子比后台自定义CSS
暂无评论内容