single_post_title

過濾鉤子
apply_filters( 'single_post_title', $_post->post_title, $_post )
引數
  • (string) $_post_title The single post page title.
    Required:
  • (WP_Post) $_post The current post.
    Required:
定義位置
相關勾子
single_tag_titlesingle_cat_titlesingle_term_titleget_post_timewidget_title
相關方法
single_post_titlesingle_month_titlesingle_cat_titlesingle_tag_titlesingle_term_titleget_post_time
引入
0.71
棄用
-

single_post_title: 該過濾鉤子用於修改單個文章檢視的標題。

過濾單個文章的頁面標題。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
$title = apply_filters( 'single_post_title', $_post->post_title, $_post );
$title = apply_filters( 'single_post_title', $_post->post_title, $_post );
$title = apply_filters( 'single_post_title', $_post->post_title, $_post );

常見問題

FAQs
檢視更多 >