導讀:comments_template 標籤是方便我們在 WordPress 網站中呼叫評論檔案 comments.php 的, 如果在主題當中沒有 comments.php 檔案, 標籤會自動獲取程式路...
<?php comments_template( $file, $separate_comments ); ?> 其中的 $file 引數是指可以匯入不同的評論檔案的, 例如: 我們在主題中建立一個 comments-other.php 檔案, 我們可以透過以下程式碼進行呼叫:
<?php comments_template( '/comments-other.php' ); ?>