2012-12-06 230 views
0

對不起,如果我的術語混淆,但我不確定什麼叫這個確切的。自定義WordPress編輯器

在Wordpress編輯帖子或頁面類型時,在編輯器的右側有部分發布,屬性,精選圖像等。我想知道是否有方法可以添加我自己的部分右側像另一個?它是自定義發佈類型還是更復雜的東西?

我想保持使用鉤子的可能性。

回答

1

這些都是 '元盒子'

http://codex.wordpress.org/Function_Reference/add_meta_box

function my_custom_meta_boxes() 
{ 
    add_meta_box(
    'custom1', // id 
    'Custom Metabox', // title 
    'display_custom_meta_box', // callback for display 
    'post', // post type 
    'normal', // position 
    'high' // priority 
); 
} 
add_action('add_meta_boxes', 'my_custom_meta_boxes'); 

function display_custom_meta_box() 
{ 
    echo 'Your meta box here'; 
} 

有可以快速創建例如箱子元插件

http://wordpress.org/extend/plugins/meta-box/

http://wordpress.org/extend/plugins/types/