Hi,
I'm trying to develop a plugin with a top-level menu, and create meta boxes with WPAlchemy. My problems are pretty basic, but I can't seem to find any resources for it.
This is the current code I have:
test.php
// Hook for adding admin menus
add_action('admin_menu', 'add_menu');
// action function for above hook
function add_menu() {
// Add a new top-level menu:
add_menu_page('Test Page Title','Test-Menu-Title','manage_options','test-slug', 'display_function');
}
function display_function() {
include 'test-page.php';
}
test-page.php is then used to generate the menu page for the plugin. I'm stuck with 2 problems:
- How do I add WPAlchemy meta box on the menu page? It is added to the 'Edit Post' page by default.
- If I would like to place all the code in the same file, what other options or are there, or what would be the best practice?
I would appreciate any sort of help or links to references. Thanks.