Drupal Administration Menu not displaying with custom theme

I have been creating a custom theme for my drupal website and I ran into this problem where the Drupal Administration Menu (module) disappears for custom themes that are not based on out-of-the-box themes. I did a lot of searching for a solution with no luck, so in the end I just ran through the code of existing themes to see what code is required for the menu. Hopefully I can help someone who may have the same question!

You basically need to have this code at the end of your page.tpl.php file:

print $closure

This should go right before the closing /body html tag. Apparently Drupal requires it to run any dynamic javascript to run.