添加到functions.php文件,新建文章的时候,标题就为当前日期了
add_filter('default_title', function ($title) {
global $post_type;
if ('post' == $post_type) {
return date('Y-m-d');
}
return $title;
});
添加到functions.php文件,新建文章的时候,标题就为当前日期了
add_filter('default_title', function ($title) {
global $post_type;
if ('post' == $post_type) {
return date('Y-m-d');
}
return $title;
});