內容簡介
這個外掛可擴展 Theme Blvd Layout Builder,讓你能將自訂範本指派給標準文章和自訂文章類型。
注意:你必須安裝有 ThemeBlvd 主題 以及具備 Layout Builder 才能讓這個外掛發揮功用。
自訂設定
這是個相當簡單的外掛,不過它會自動為所有文章類型加入自訂範本選擇的資料框。如果你希望從某些文章類型中排除這個資料框,你可以從附加至過濾器 themeblvd_ltp_post_types 的陣列中取消設定那些文章類型。
function my_ltp_post_types( $post_types ) {
unset( $post_types['post_type_to_remove'] );
return $post_types;
}
add_filter( 'themeblvd_ltp_post_types', 'my_ltp_post_types' );
外掛標籤
開發者團隊
原文外掛簡介
This plugin extends the Theme Blvd Layout Builder so you can assign your custom templates to standard posts and custom post types.
Note: You must have a Theme Blvd theme installed with the Layout Builder for this plugin to do anything.
Customization
This is a pretty simple plugin, however it will add the custom template selection meta box to all post types automatically. If you’d like to exlude the meta box from certain post types, you can unset those post types from the array attached to the filter themeblvd_ltp_post_types.
function my_ltp_post_types( $post_types ) {
unset( $post_types['post_type_to_remove'] );
return $post_types;
}
add_filter( 'themeblvd_ltp_post_types', 'my_ltp_post_types' );
