This goes over adding menu items. http://codex.wordpress.org/Adding_Administration_Menus
I would recommend sticking to the standard options page format if you’re adding a page with some sort of form to the admin side. That’s discussed Here
Thread Starter
Pamela
(@infoknutsford-softwarecouk)
Under wp-contnet/plugins i have created a libray called courses.. UNder courses I have a page called courses.php. This contains
<?php
add_action(‘admin_menu’, ‘course_create_admin_menu’);
function course_create_admin_menu() {
add_object_page(‘Course Dependencies’, ‘Course Dependencies’, ‘manage_options’,’course dependencies’, ‘course_order’);
}
function course_order() {
?>
<div class=”wrap”>
<h2>Course Dependencies/h2>
</div>
<?php
}
?>
No link appears in the admin menu though. What am I doing wrong? Thanks
For the most part that looks right, but I do see 1 typo.
On line 5 your have “add_object_page” … that should be options, not object.
add_options_page('Course Dependencies', 'Course Dependencies', 'manage_options','course dependencies', 'course_order');
I’m also assuming that you have it in either your theme’s functions.php file or in a plugin file with a correct plugin header so that you can activate it. If its not in either of those places, the code won’t run.