Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Craig Jamieson
19,585 PointsWrite an empty function named custom_filter(). Then add your function to the "the_content" filter
I have written the answer as
<?php
function custom_filter( ) {
add_filter(‘the_content’,'custom_filter’);
}
?>
<?php
function custom_filter( ) { }
add_filter(‘the_content’,'custom_filter’);
?>
Both are wrong. Please advise?
3 Answers

Craig Jamieson
19,585 PointsNot even sure how that happened, but retyped and that worked
<?php
function custom_filter( ) { }
add_filter('the_content','custom_filter');
?>

Cena Mayo
55,235 PointsHi Craig,
The second answer is more correct than the first (the first is not an empty function). In the second, check your quotes. They appear to be mismatched.

Louis Rouaze
1,397 Pointsquotes were wrong for first attempt.