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

Oliver Williams
Oliver Williams
6,278 Points

Using jQuery plugins with Wordpress

In functions.php I have the following code

function wpt_theme_js() { wp_enqueue_script( 'fullpagejs', get_template_directory_uri() . '/js/jquery.fullPage.min.js', array('jquery'), '', true ); } add_action( 'wp_enqueue_scripts', 'wpt_theme_js' );

I can't get any simple plugins to work. Am I missing something?

In the relevant page template I have some jquery code in script tags just before the closing body tag. I am typing jQuery rather than the dollar sign

<script>jQuery(document).ready(function() { jQuery('#fullpage').fullpage(); });

</script>

1 Answer

Kevin Korte
Kevin Korte
28,149 Points

If you run that code small script tag you have before the closing body in the console, what does it return?