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 trialOleksii Vilchanskyi
Courses Plus Student 364 PointsWhy when I type custom_filter(){}; it says "unexpected '}'"?
I think I wrote empty function as it was asked in this task. I can't go further without completing this task. Help please
<?php
?>
2 Answers
Shane Oliver
19,977 PointsYou need to create a function for your custom filter and add your filter to the_content hook
<?php
function custom_filter( ) { }
add_filter('the_content','custom_filter');
?>
Oleksii Vilchanskyi
Courses Plus Student 364 PointsI did exact code as you before I answered this question and result was the same: "Unexpected '}'"