However, there are a few things one need to remember when writing code in that file, and it’s not always easy to understand. Specifically, registering and enqueueing scripts can be a bit tricky if you don’t understand how the functions.php file is loaded.
One of the biggest problem is understanding the scope and load/execution time of what is in that file. I’ve scratched my head a few times on it, and hopefully, I now understand it better and will manage to write it down correctly! (more…)