Silly mistake… on my archive pages I switched from include_once to include, and it works 🙂
If possible, though, I’d still like to know if anyone knows how I can move these variables and functions over to functions.php and not have a separate file just for this.