doさんのいいねボタンプラグインを使用している方向けの、コメント返信アーカイブ方法です。
    忘れないうちに書いてるので説明が雑です。すみませんが中級者向けの参考程度にしかならないと思います。
     

    一覧イメージ

    投稿イメージ

    アーカイブイメージ

    アーカイブページはこちら

     
    まずは素敵なプラグインに大感謝を。配布元はこちらから。
     
    「いいねボタン実装したけどコメントの返信どうするんだ?」と私も思いました。
    簡単に返信、蓄積できる方法を模索しているところですが現状の方法を紹介します。

    ただしこのサイトと同じような個人サイト用テンプレートは存在しないので、
    コードそのまま丸ごと使っても上手く機能しません。

    ※全て自己責任でお願いします。必ずバックアップを取ってからお試しください。
    ※現状WP6.8.3、PHP8.0の環境で構築しています。
    ※いいねボタンプラグイン自体は全く改造しません。

     

    作業内容

    ・コメント返信の投稿機能追加
    ・コメント返信のアーカイブページ作成

     

    実装手順

    1.コメント返信用のカスタム投稿タイプを作成する
    2.カスタムフィールドを作成する
    3.アーカイブページを作成する

     

    1.コメント返信用のカスタム投稿タイプを作成する

    function.phpにコードを追加します。
    カスタム投稿タイプの追加に加えて、投稿一覧の表示内容も調整しています。

    //------------------------------------------------------
    // カスタム投稿タイプの設定
    //------------------------------------------------------
      
    //カスタム投稿タイプ作成 
    function create_post_type_res() {
        register_post_type( 'res', /* post-type */
        array(
            'labels' => array(
            'name' => __( 'コメント返信' ), 
            'singular_name' => __( 'コメント返信' ),
            'edit_item' => 'コメント返信を編集',
            'add_new_item' => 'コメント返信を新規追加',
            'all_items' => 'コメント返信の一覧',
        ),
            'public' => true,
            'menu_position' =>4,
            'menu_icon' => 'dashicons-businessman',
            'supports' => array('author','editor'),
            'has_archive' => true,
        )
        );
        flush_rewrite_rules();
        }
        add_action( 'init', 'create_post_type_res' );
    
    //------------------------------------------------------
    // res 一覧
    //------------------------------------------------------
    
    // 列の並び
    add_filter('manage_edit-res_columns', function($columns){
        $new = [];
        // 1) チェックボックス列
        if (isset($columns['cb'])) $new['cb'] = $columns['cb'];
        // 2) サムネイル列
        $new['res_thumb']   = 'サムネイル';
        // 3) 本文30文字列
        $new['res_excerpt'] = '本文';
        // 4) 投稿者
        $new['author'] = '投稿者';
        // 5) 日付
        $new['date']   = '日付';
        return $new;
    });
    
    // 各カスタム列の中身
    add_action('manage_res_posts_custom_column', function($column, $post_id){
        // --- サムネイル列 ---
        if ($column === 'res_thumb') {
            $thumb_html = '';
    
            // ACF: page link フィールド 'url' → リンク先のサムネイルを取得
            $link_val = function_exists('get_field') ? get_field('url', $post_id) : null;
            $linked_post_id = 0;
    
            if ($link_val) {
                if (is_numeric($link_val)) {
                    $linked_post_id = (int)$link_val;
                } elseif (is_object($link_val) && isset($link_val->ID)) {
                    $linked_post_id = (int)$link_val->ID;
                } elseif (is_string($link_val)) {
                    $linked_post_id = url_to_postid($link_val); // 外部URLは 0
                } elseif (is_array($link_val) && isset($link_val['ID'])) {
                    $linked_post_id = (int)$link_val['ID'];
                }
            }
    
            if ($linked_post_id && has_post_thumbnail($linked_post_id)) {
                $thumb_html = get_the_post_thumbnail(
                    $linked_post_id,
                    'thumbnail',
                    ['class' => 'res-thumb-img', 'loading' => 'lazy', 'decoding' => 'async', 'alt' => '']
                );
            }
    
            // 画像(あれば表示、なければ空)
            echo $thumb_html ? '<div class="res-thumb">'.$thumb_html.'</div>' : '';
            return;
        }
    
        // --- 本文30文字列 ---
        if ($column === 'res_excerpt') {
            $text = wp_strip_all_tags(get_post_field('post_content', $post_id));
            $text = trim(preg_replace('/\s+/u', ' ', $text));
            $excerpt = mb_substr($text, 0, 30, 'UTF-8');
            if (mb_strlen($text, 'UTF-8') > 30) $excerpt .= '…';
            if ($excerpt === '') $excerpt = '(無題)';
            $edit_link = get_edit_post_link($post_id);
    
            echo '<a href="'.esc_url($edit_link).'">'.esc_html($excerpt).'</a>';
    
            // 行アクション
            $actions = [];
            $actions['edit']  = '<a href="' . esc_url($edit_link) . '">編集</a>';
            if (get_post_status($post_id) !== 'trash') {
                $actions['view']  = '<a href="' . esc_url(get_permalink($post_id)) . '" target="_blank" rel="noopener">表示</a>';
                $actions['trash'] = '<a href="' . esc_url(get_delete_post_link($post_id)) . '">ゴミ箱へ移動</a>';
            }
            echo '<div class="row-actions">' . implode(' | ', $actions) . '</div>';
            return;
        }
    
        // 投稿者(任意整形)
        if ($column === 'author') {
            $user = get_userdata((int) get_post_field('post_author', $post_id));
            echo esc_html($user ? $user->display_name : '—');
            return;
        }
    
        // 日付(任意フォーマット)
        if ($column === 'date') {
            $time = get_post_time('U', false, $post_id);
            echo esc_html( date_i18n('Y-m-d H:i', $time) );
            return;
        }
    }, 10, 2);
    
    // 見た目(チェックボックス列を細く/サムネイル列の幅)
    add_action('admin_head', function () {
        $screen = get_current_screen();
        if (!$screen || $screen->id !== 'edit-res') return;
        ?>
        <style>
          /* res 一覧画面だけに適用 */
          body.post-type-res .wp-list-table .check-column {
              /* 通常投稿と同等の細さ(約2.2em)に */
              width: 2.2em !important;
          }
          /* サムネイル列の見た目 */
          body.post-type-res .column-res_thumb { width: 72px; }
          body.post-type-res .column-res_thumb .res-thumb-img {
              width: 60px; height: 60px; object-fit: cover; border-radius: 4px; display: block;
          }
          /* 本文列の幅微調整(必要に応じて) */
          body.post-type-res .column-res_excerpt { width: auto; }
        </style>
        <?php
    });
    

     

    2.カスタムフィールドを作成する

    プラグイン「Advanced Custom Fields」が便利なのでこれを使います。
    (作者はWP EngineでもKonrad Chmielewskiでも、今のところどっちでもいいです)
     

     

    3.アーカイブページを作成する

    archive-res.phpを作成します。以下はループ宣言しか流用できる部分ないですけどこのサイトのコードです。

    <section>
    <h2>コメント返信</h2>
    <dl class="list_qa accordion-item">
    
    <?php
    // クエリ条件を設定
    $args = array(
        'post_type'      => 'res',        // カスタム投稿タイプ
        'orderby'        => 'date',       // 投稿日順
        'paged'          => get_query_var('paged') ? get_query_var('paged') : 1 // ページネーション対応
    );
    $query = new WP_Query($args);
    ?>
    
    <?php if ( $query->have_posts() ): ?>
        <?php while ( $query->have_posts() ): $query->the_post(); ?>
            <?php
            $day = get_field('day');
            $url = get_field('url');
            ?>
            
            <div class="box_qa">
                <input class="accordion-check" id="accordion-<?php the_ID(); ?>" type="checkbox">
                <dt>
                    <label class="accordion-label" for="accordion-<?php the_ID(); ?>">
                        <div class="res_fl">
    <div class="res_txt"><?php echo ($day); ?></div>
    
                        <?php if($url): ?>
                        <?php
                        // URLから投稿IDを取得
                        $post_id = url_to_postid($url);
                        // 投稿IDが取得でき、アイキャッチがある場合
                        if($post_id && has_post_thumbnail($post_id)): ?>
                        <div class="res_thumb">
                            <a href="<?php echo esc_url($url); ?>">
                                <?php echo get_the_post_thumbnail($post_id, 'thumbnail'); ?>
                            </a>
                        </div>
                        <?php endif; ?>
                        <?php endif; ?>
    
                        </div>
                    </label>
                </dt>
                <dd class="accordion-box"><?php the_content(); ?><p>りも。</p></dd>
            </div>
        <?php endwhile; ?>
    
        <!-- ページネーション -->
    <div class="pagination">
        <?php
        echo paginate_links( array(
            'total'        => $query->max_num_pages, // WP_Queryで作ったオブジェクトの総ページ数
            'current'      => max( 1, get_query_var('paged') ),
            'mid_size'     => 1, // 現在ページの前後に表示するページ数
            'prev_text'    => '&laquo;', // 「前へ」リンクテキスト
            'next_text'    => '&raquo;', // 「次へ」リンクテキスト
            'type'         => 'list' // <ul>タグで出力('plain'にするとテキストのみ)
        ) );
        ?>
    </div>
    
    
    <?php endif; ?>
    <?php wp_reset_postdata(); ?>
    
    
    </dl>
    </div>
    </section>
    

     
    もうちょい丁寧に解説できたら良いんですけど、時間があればまた修正します。

    送信中です

    ×

    ※コメントは最大500文字、5回まで送信できます

    送信中です送信しました!