WordPress 系统日历 隐藏或去除发布文章的日期归档链接 ,在网上找了很久也没有找到相关的资料,受网上另外一篇讲小工具添加 nofollow 属性的文章启发,找到这个方法,打开网站的 wp-includes
目录,找到 general-template.php
文件,注释掉 Get days with posts
部分即可 ,记录在此
//2199 Get days with posts
$dayswithposts = $wpdb->get_results(
"SELECT DISTINCT DAYOFMONTH(post_date)
FROM $wpdb->posts WHERE post_date >= '{$thisyear}-{$thismonth}-01 00:00:00'
AND post_type = 'post' AND post_status = 'publish'
AND post_date <= '{$thisyear}-{$thismonth}-{$last_day} 23:59:59'",
ARRAY_N
);
if ( $dayswithposts ) {
foreach ( (array) $dayswithposts as $daywith ) {
$daywithpost[] = $daywith[0];
}
}
在这个文件里面顺便找到小工具里面的链接加上 nofollow 属性,参考上面那篇文章