《wordpress評論標簽comments_template 的使用》要點:
本文介紹了wordpress評論標簽comments_template 的使用,希望對您有用。如果有疑問,可以聯系我們。
導讀:comments_template標簽是便利我們在wordpress網站中調用評論文件comments.php的,如果在主題當中沒有comments.php文件,標簽會自動獲取程序路...
comments_template標簽是便利我們在wordpress網站中調用評論文件comments.php的,如果在主題當中沒有comments.php文件,標簽會自動獲取程序路徑wp-includes/theme-compat/comments.php的默認評論模塊,在模板制作中我們使用以下標簽進行調用:
<?php comments_template( $file, $separate_comments ); ?>
其中的$file參數是指可以導入不同的評論文件的,例如:我們在主題中創建一個 comments-other.php 文件,我們可以通過以下代碼進行調用:
<?php comments_template( '/comments-other.php' ); ?> ?《wordpress評論標簽comments_template 的使用》是否對您有啟發,歡迎查看更多與《wordpress評論標簽comments_template 的使用》相關教程,學精學透。維易PHP學院為您提供精彩教程。
轉載請注明本頁網址:
http://www.snjht.com/jiaocheng/13788.html