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 trialHabtemariam Kidane
2,887 Pointschallenge task 1 of 2
what is wrong with my work, can some one help?
Create an empty function my_plugin_styles and then use information in comment to enqueue the admin stylesheet
<?php
// Handle: my_plugin_css
// Plugin folder: my-plugin
// CSS file: my-plugin.css
function my_plugin_styles() {};
wp_enqueue_style( 'my_plugin_css', plugin_url( 'my-plugin/my-plugin.css' ) ) ;
}
?>
1 Answer
Colin Marshall
32,861 PointsOn the line where you declare the function, you actually closed the function before you put any code inside of it. So your wp_enqueue_style
code is not actually inside your function. You just need to remove two items so that your wp_enqueue_style
sits inside of the two curly braces of your function.
Jorge Felico
15,543 PointsJorge Felico
15,543 PointsNoted.
Jorge
Colin Marshall
32,861 PointsColin Marshall
32,861 PointsThanks Jorge! I know it's hard when everybody else posts up the answer right away, but I believe we can collectively improve this.
Jorge Felico
15,543 PointsJorge Felico
15,543 PointsColin, I totally agree with you. I'll help spread the word. Jorge