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

Luke Lee
Luke Lee
7,577 Points

2 errors on treehouse badges plugin

I turned on wordpress bebug option, and 2 errors came up: Notice: Use of undefined constant wptreehouse_badges_shortcode - assumed 'wptreehouse_badges_shortcode' in /Applications/MAMP/htdocs/allsongrayce.com/wp-content/plugins/wptreehouse-badges/wptreehouse-badges.php on line 149

Notice: Use of undefined constant wptreehouse_badges_enable_frontend_ajax - assumed 'wptreehouse_badges_enable_frontend_ajax' in /Applications/MAMP/htdocs/allsongrayce.com/wp-content/plugins/wptreehouse-badges/wptreehouse-badges.php on line 188

Anyone know how to fix this? Thanks.

1 Answer

Andrew McCormick
Andrew McCormick
17,730 Points

First, these are just notices, not errors. Unless you are having an issue, they probably will not affect functionality. Nonetheless, it's good to fix. Can you post the relative lines of code of blocks of code (lines 149 and 188) from the php file.

Luke Lee
Luke Lee
7,577 Points

Thank you, Andrew. suddenly the error is gone, I don't know what I did.