Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialChristian Kristoffersen
32,531 PointsProblems with code challenge 1 in Creating a Plugin Settings Page
I have a bit of trouble with this code challenge :) Is there anyone that could maybe take a look at it :) This is what i've done, but it's not right
<?php
function my_plugin_menu() {
add_options_page (
'My Plugin Settings Page'
'My Plugin'
'My Plugin'
'manage_options'
'my_plugin_options_page'
);
}
add_action( 'admin_menu', 'my_plugin_menu' );
?>
2 Answers
Aaron Jackson
5,644 Points<?php
function my_plugin_menu() {
add_options_page (
'My Plugin Settings Page',
'My Plugin',
'manage_options',
'my-plugin',
'my_plugin_options_page'
);
}
add_action('admin_menu' , 'my_plugin_menu' );
?>
Your could should look like that to get pass the first challenge
Aaron Jackson
5,644 PointsNo problem glad to help!
Christian Kristoffersen
32,531 PointsChristian Kristoffersen
32,531 PointsArrh, thank you very much Aaron! This really helped!