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 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.