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 WordPress Theme Development Working with CSS and JS in WordPress Themes How to Link to JS from functions.php File

Gary Calhoun
Gary Calhoun
10,317 Points

Is the $handle like a variable?

I thought that the handle had to be named just like file but he named the handle main_js and its referencing the app.js I realized this was not true, so am thinking now that a wordpress $handle can be whatever you want it to be, and you can call upon it further into your coding?

1 Answer

As I understand it, I would say no. You're not really passing it a value. It's more like an identifier pointing to a resource, sort of like a username on a message board. I think you can name it whatever you like but it's probably easier to remember what it's pointing to if the name is similar.

Anthony Attard
Anthony Attard
43,915 Points

To expand on that the difference between an "identifier pointing to a resource" and a variable is that you can use variables in functions.