[PR] Use proper hooks for predictable WP and theme load

Updated a couple areas of `functions.php` to use the corresponding hooks in WordPress.