-
-
+
false]);
+}
+
get_footer();
diff --git a/templates/pages/page-categories.php b/templates/pages/page-categories.php
index 25cf8c4e..304a31cf 100644
--- a/templates/pages/page-categories.php
+++ b/templates/pages/page-categories.php
@@ -46,26 +46,31 @@ if ($page_title === '') {
}
?>
-
+ get_results(
+ "SELECT DISTINCT YEAR(post_date) AS year, MONTH(post_date) AS month, COUNT(*) AS count
+ FROM {$wpdb->posts}
+ WHERE post_type = 'post' AND post_status = 'publish'
+ GROUP BY YEAR(post_date), MONTH(post_date)
+ ORDER BY year DESC, month DESC"
+ ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery
+ $current_year = 0;
+ foreach ($years as $row) :
+ if ((int) $row->year !== $current_year) :
+ $current_year = (int) $row->year;
+ ?>
+
+
+
+ + month, (int) $row->count)); ?> +
+-
+ (int) $row->year,
+ 'monthnum' => (int) $row->month,
+ 'posts_per_page' => -1,
+ 'post_status' => 'publish',
+ ]);
+ foreach ($month_posts as $mp) :
+ ?>
+
- + + post_title); ?> + + +
+
+ esc_html($page_title),
+ 'desc' => $cats_meta,
+ ]);
+ ?>
-
-
-
-
-
-
+
term_id;
@@ -124,7 +129,11 @@ if ($page_title === '') {
-
+
false]);
+}
+
get_footer();
diff --git a/templates/pages/page-friends.php b/templates/pages/page-friends.php
index 0a71ef07..060b7631 100644
--- a/templates/pages/page-friends.php
+++ b/templates/pages/page-friends.php
@@ -11,51 +11,56 @@ defined('ABSPATH') || exit;
get_header();
$links = function_exists('aksrt_get_friend_links') ? aksrt_get_friend_links() : [];
+
+if (function_exists('aksrt_archive_open_shell')) {
+ aksrt_archive_open_shell([
+ 'main_class' => 'site-main container content-shell content-shell--page page-content-default',
+ 'has_sidebar' => false,
+ 'page_kind' => 'friends',
+ ]);
+}
?>
+
+ esc_html__('友情链接', 'aksrt'),
+ 'desc' => __('与这些优秀的站点交换友链', 'aksrt'),
+ ]);
+ ?>
-
-
-
-
-
+
+
+
+
-
false]);
+}
+
get_footer();
diff --git a/templates/pages/page-newposts.php b/templates/pages/page-newposts.php
index 635f9241..7ca132b6 100644
--- a/templates/pages/page-newposts.php
+++ b/templates/pages/page-newposts.php
@@ -14,7 +14,6 @@ get_header();
$paged = max(1, (int) get_query_var('paged'));
$per_page = 20;
-
$query = new WP_Query([
'post_type' => 'post',
'post_status' => 'publish',
@@ -23,45 +22,51 @@ $query = new WP_Query([
'orderby' => 'date',
'order' => 'DESC',
]);
+
+if (function_exists('aksrt_archive_open_shell')) {
+ aksrt_archive_open_shell([
+ 'main_class' => 'site-main container content-shell content-shell--page page-content-default',
+ 'has_sidebar' => false,
+ 'page_kind' => 'newposts',
+ ]);
+}
?>
+
+
+
+
+
-
-
-
-
+ esc_html(get_the_title() ?: __('最新文章', 'aksrt')),
+ ]);
+ ?>
-
-
-
-
-
-
-
-
+ '; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
+ }
+ wp_reset_postdata();
+ ?>
+
+
+
+
-
-
-