Custom metabox for menu administration page?

I’ve been googleing around but failed to find a solution for my need.
I’m using wordpress 3.0 and TwentyEleven theme as default pack.
In the Dashboard -> appearance->menus that allow user can create menu items from Pages,Categories,and custom link.
Now I want to add a box like those boxes above but it would list my custom-post-type’s taxonomy and metadata. How can I accomplish with this task ?

I know how to add metabox and taxonomy for custom post type but cannot do with this sort of thing.

2 Answers
2

Just as a follow up for anybody looking to add their own meta boxes to the menu screen, you can do it by using ‘nav-menus’ for the post type:

add_action( 'admin_init', 'my_add_meta_box' );

function my_add_meta_box() {
    add_meta_box( 'custom-meta-box', __('My meta box'), 'my_nav_menu_item_link_meta_box', 'nav-menus', 'side', 'default' );
}

function my_nav_menu_item_link_meta_box() {

    ?>
    <div class="custom-meta-box" id="custom-meta-box">
            Your meta box content goes here
    </div>
    <?php
}

I hope that helps somebody!

Leave a Comment