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 trial

WordPress WordPress Hooks - Actions and Filters An Overview of Hooks in WordPress Working with $wp_filter

The 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.

Elijah Gartin
Elijah Gartin
13,182 Points

Hi Joy, could you please copy and paste the error you're getting so we can best help you troubleshoot?

Thanks!

4 Answers

HI Joy,

Change your index.php to :

<title><?php wp_title( '|', true, 'right' ); ?></title>

<?php get_header(); ?>

<?php get_footer(); ?>

Paulius Vitkus
Paulius Vitkus
24,230 Points

Joy, 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
STAFF
Zac Gordon
Treehouse Guest Teacher

Hi,

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?

Hi 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
STAFF
Zac Gordon
Treehouse Guest Teacher

Again, 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?)