Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Using core meta boxes elsewhere WordPress



Has anyone successfully used core meta boxes (eg Post Tags) on other parts of the dashboard?

I have two requirements: one to use a custom taxonomy meta box on the add link page and secondly to use the Post Tags box on a custom settings page.

I've tried this code for the first requirement:

$tax_name ='countries';
$taxonomy = get_taxonomy($tax_name);
if ( ! $taxonomy->show_ui )

$label = $taxonomy->labels->name;

if ( !is_taxonomy_hierarchical($tax_name) )
add_meta_box('tagsdiv-' . $tax_name, $label, 'post_tags_meta_box', 'link', 'normal', 'high', array( 'taxonomy' => $tax_name ));

but with only small joy - the box appears, but doesn't function.

It feels like some javascript is missing, but I don't know what.


Answers (2)


Peter Michael answers:

Maybe this helps:

[[LINK href=""]][[/LINK]]

John Cotton comments:

Thanks Peter, that's a helplink.

This is what I was missing to get the custom taxonomy on the link page:


Any suggestions about getting the standard tags box onto a custom settings page (it's acutally popped up via an ajax call)? I suppose my question is: what page name do I use for the first parameter of this?

do_meta_boxes('settings_page_shiba_test', 'side', $test_object);


Denzel Chia answers:


I believe what you want is in this tutorial.


John Cotton comments:

Thank Denzal, but that's not what I'm after.

I want to use the meta-boxes elsewhere - for example on a custom settings page that pops up via ajax on some extensions I've written. They use custom tables and so are unrelated to the main flow of WordPress.