comments_template

過濾鉤子
apply_filters( 'comments_template', $theme_template )
引數
  • (string) $theme_template The path to the theme template file.
    Required:
定義位置
相關勾子
comment_textcomments_template_query_argscomment_emailcommentrss2_itemcomments_open
相關方法
comments_templateget_comments_popup_templatecomment_typecomment_dateget_templatecomment_text
引入
1.5.1
棄用
-

comments_template: 這個函式用來載入一個給定文章的評論模板。預設情況下,這個函式載入活動主題的comments.php模板,但你可以使用comments_template過濾器來載入一個自定義的評論模板。

過濾用於評論模板的主題模板檔案的路徑。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
$include = apply_filters( 'comments_template', $theme_template );
$include = apply_filters( 'comments_template', $theme_template );
$include = apply_filters( 'comments_template', $theme_template );

常見問題

FAQs
檢視更多 >