diff --git a/author.php b/author.php
index b8fc50d..74f5e36 100644
--- a/author.php
+++ b/author.php
@@ -61,7 +61,7 @@ $author_query = new WP_Query(array(
diff --git a/functions.php b/functions.php
index 8563f9e..fcf6fca 100644
--- a/functions.php
+++ b/functions.php
@@ -141,11 +141,19 @@ add_action('template_include', function($template) {
-// 禁用 Gravatar — 本地默认头像
+// 本地头像(团队证件照)
add_filter('get_avatar', function($avatar, $id_or_email, $size, $default, $alt) {
- // 用 data URI 的默认灰色圆圈替代
- $svg = '';
- return '';
+ $uid = 0;
+ if (is_numeric($id_or_email)) $uid = (int) $id_or_email;
+ elseif (is_object($id_or_email) && isset($id_or_email->user_id)) $uid = (int) $id_or_email->user_id;
+ $att_id = get_user_meta($uid, 'custom_avatar', true);
+ if ($att_id) {
+ $url = wp_get_attachment_image_url($att_id, 'medium');
+ if ($url) {
+ return '';
+ }
+ }
+ return $avatar; // fallback
}, 10, 5);
// 激活主题时自动初始化
diff --git a/page-articles.php b/page-articles.php
index b6ac18d..8b98d5f 100644
--- a/page-articles.php
+++ b/page-articles.php
@@ -5,7 +5,7 @@
get_header();
$pg = isset($_GET['pg']) ? max(1, (int) $_GET['pg']) : 1;
-$per_page = 3;
+$per_page = 20;
$query = new WP_Query(array(
'post_type' => 'post',
'posts_per_page' => $per_page,
@@ -23,6 +23,11 @@ $total_pages = ceil($total / $per_page);