wp_title_parts

過濾鉤子
apply_filters( 'wp_title_parts', explode( $t_sep, $title )
引數
  • (string[]) $title_array Array of parts of the page title.
    Required:
定義位置
相關勾子
wp_title_rsswp_titleget_wp_title_rssdocument_title_partsthe_title_rss
相關方法
wp_title_rssget_wp_title_rsswp_titlewp_write_postthe_title_rsswp_style_is
引入
4.0.0
棄用
-

wp_title_parts: 這是一個 WordPress 函式,它可以將標題分解為不同的部分: 這個函式接受標題字串作為輸入,並返回一個陣列,其中包含標題的不同部分。您可以使用此函式在 WordPress 的標題元素中顯示不同的標題部分。

過濾頁面標題的部分內容。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
$title_array = apply_filters( 'wp_title_parts', explode( $t_sep, $title ) );
$title_array = apply_filters( 'wp_title_parts', explode( $t_sep, $title ) );
$title_array = apply_filters( 'wp_title_parts', explode( $t_sep, $title ) );

常見問題

FAQs
檢視更多 >