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.

WordPress How to Build a WordPress Plugin Building WordPress Widgets, and Shortcodes How to Create a WordPress Shortcode

suyash patankar
suyash patankar
2,310 Points

Notice : Notice: do_shortcode_tag was called incorrectly.

I copy+paste code from project files attached here.

I get following notice and my shortcode do not work at all.

Notice: do_shortcode_tag was called incorrectly. Attempting to parse a shortcode without a valid callback: wptreehouse_badges Please see Debugging in WordPress for more information. (This message was added in version 4.3.0.) in D:\xampp\htdocs\wordpress\wp-includes\functions.php on line 3622

Please help

1 Answer

Steven Stanton
Steven Stanton
59,998 Points

I just had the same issue. In my case my mistake was that I had made the function that I reference in add_shortcode () private, so WordPress was unable to find it. I don't know if that is of any help.