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 trialJoy Ahmed
Courses Plus Student 9,687 PointsThe theme doesn't work in this course
The project files provided with the course, WordPress Hooks - Actions and Filters, doesn't work. It gives a JavaScript error. Please, help.
4 Answers
Nuno Sarmento
4,400 PointsHI Joy,
Change your index.php to :
<title><?php wp_title( '|', true, 'right' ); ?></title>
<?php get_header(); ?>
<?php get_footer(); ?>
Paulius Vitkus
24,230 PointsJoy, open functions.php file and edit require_once('examples/remove_menus.php');
with require_once('examples/export_wp_filter.php');
.
By default, the first loaded hook is remove_menus, not export_wp_filter, as shown in video.
Zac Gordon
Treehouse Guest TeacherHi,
This theme is only a group of example files so you can see the code that we're using. It isn't meant to run or do anything specific.
Can you explain what it is you're trying to do with the project files that isn't working?
Joy Ahmed
Courses Plus Student 9,687 PointsHi Zac,
Actually I get a blank page showing nothing as I work on, with JavaScript error: Uncaught TypeError: Cannot read property 'className' of null.
The error is in this line(line number 26): b[c] = b[c].replace( rcs, ' ' );
But i can't solve it. Please, do help.
Zac Gordon
Treehouse Guest TeacherAgain, this template was only meant as a demo and not really meant to work as an actual theme.
What include files are you trying to work with that are getting the errors? (What does your functions.php look like?)
Elijah Gartin
13,182 PointsElijah Gartin
13,182 PointsHi Joy, could you please copy and paste the error you're getting so we can best help you troubleshoot?
Thanks!