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 trialammarkhan
Front End Web Development Techdegree Student 21,661 PointsAdding jquery ui?
How do i get jquery-ui to work in wordpress, as my jquery in dependent on jquery-ui for slider etc.?
2 Answers
Zac Gordon
Treehouse Guest TeacherYup, you would do something like this:
But you could replace this:
get_stylesheet_directory_uri() . '/js/custom_script.js',
With something like this:
'https://code.jquery.com/ui/1.11.4/jquery-ui.min.js',
Also, check out this post on StackExchange (good place to search for stuff like this):
Joe Hartman
20,881 PointsMy first thought would be to link to it the same way you linked to the bootstrap.min.js file. Take a look at the functions.php page and use Zac's example. You'll have to download the jquery-ui and put it in the right folder but you should be able to import it like any other javascript file.