From cbcdbc1bb8d041ebbb93e8b4478ff69b3b0fa83e Mon Sep 17 00:00:00 2001 From: Commander1024 Date: Mon, 27 Jul 2026 12:11:24 +0200 Subject: [PATCH] Redesign comment rendering and styling --- comments.php | 5 +-- functions.php | 28 +++++++++++++++++ style.css | 84 +++++++++++++++++++++++++++++++++++++++++++++++++-- 3 files changed, 112 insertions(+), 5 deletions(-) diff --git a/comments.php b/comments.php index 9bc7262..9246670 100644 --- a/comments.php +++ b/comments.php @@ -4,8 +4,9 @@ if ( post_password_required() ) { return; } ?>
-

-
    'ol', 'short_ping' => true, 'avatar_size' => 48 ) ); ?>
+

+ +
    'ol', 'short_ping' => true, 'avatar_size' => 44, 'callback' => 'c1024_2026_comment' ) ); ?>

diff --git a/functions.php b/functions.php index e59406a..6ccbdd5 100644 --- a/functions.php +++ b/functions.php @@ -53,6 +53,34 @@ function c1024_2026_customize_register( $wp_customize ) { // Customize controls are registered only while the Customizer API is available. add_action( 'customize_register', 'c1024_2026_customize_register' ); +/** + * Render comments without the default avatar-heavy, numbered-list presentation. + * + * WordPress's Walker_Comment closes the wrapping list item after this callback. + */ +function c1024_2026_comment( $comment, $args, $depth ) { + ?> +
  • id="comment-"> +
    +
    + 'comment-avatar' ) ); ?> +
    + + + ', '' ); ?> +
    +
    + comment_approved ) { ?> +

    + +
    +
    + 'div-comment', 'depth' => $depth, 'max_depth' => $args['max_depth'], 'reply_text' => esc_html__( 'Reply', 'c1024-2026' ) ) ) ); ?> +
    +
    + :last-child { + margin-bottom: 0; +} + +.comment-awaiting-moderation { + margin: 1rem 0 0; + color: var(--accent); + font-family: "Berkeley Mono", monospace; + font-size: 1rem; +} + +.comment-actions { + margin-top: 1.25rem; + font-family: "Berkeley Mono", monospace; + font-size: 1rem; +} + +.comment-form label, +.comment-form .logged-in-as, +.comment-form .comment-notes, +.comment-form .form-submit { + font-family: "Berkeley Mono", monospace; + font-size: 1rem; } .comment-form input:not([type="submit"]), .comment-form textarea {