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

Paul Hewett
PLUS
Paul Hewett
Courses Plus Student 1,739 Points

Error linking to java script

Hello,

I'm working through the develop your own theme in wordpress project and I have hit a major bump in the road (for me anyway). I'm trying to link the Java script, but I have this random code appearing in the footer. I have been through the code twice and can't see where I am going wrong. Any help would be appreciated. Thanks. ------------------CODE BELOW ------------------------------ <script type="text/javascript"> (function() { var request, b = document.body, c = 'className', cs = 'customize-support', rcs = new RegExp('(^|\s+)(no-)?'+cs+'(\s+|$)');

        request = true;

        b[c] = b[c].replace( rcs, ' ' );
        b[c] += ( window.postMessage && request ? ' ' : ' no-' ) + cs;
    }());
</script>

2 Answers

Mike Bronner
Mike Bronner
16,395 Points

I think the solution may be posted here: http://wordpress.org/support/topic/how-to-get-rid-of-fix-coding-visible-in-public-page It appears to be code injected by Cufon. Try disabling the Cufon plugin you are using, and see if the code goes away.

Let us know if that was it. :)

Paul Hewett
PLUS
Paul Hewett
Courses Plus Student 1,739 Points

Thanks for your comment Mike, I will give that a go.