【DW Question & Answer】回答にレス番を表示させる方法
ヤフー知恵袋のような仕組みが作れるDW Question & Answerプラグインですが、回答者ごとにレス番を表示させる方法をメモっておきます。
How to display ReplyID(answerID).
※プラグイン内部を触りますのでバックアップは取っておいて下さい。。。
wp-content\plugins\dw-question-answer\templates\scontent-single-answer.php
(pro版)wp-content\plugins\dw-question-answer-pro\templates\styles\default\scontent-single-answer.php
23行目
<?php printf( __( '<span><a href="%1$s">%2$s%3$s</a> %4$s answered %5$s ago</span>', 'dwqa' ), dwqa_get_author_link( $user_id ), get_avatar( $user_id, 48 ), get_the_author(), dwqa_print_user_badge( $user_id ), human_time_diff( get_post_time( 'U', false ), current_time( 'timestamp' ) ) ) ?> <?php if ( 'private' == get_post_status() ) : ?>
上記コードが回答者の名前の箇所になります。
なので上記コードの前あたりに
↑This code is answers username.
<?php echo get_the_ID()?>
を挿入すればOKです。
↑and add this code.