Hello,
1) Could you, please, provide us with WP Dashboard and FTP access to your site to check the issue in more detail and help you?
2) It’s bad practice to create functions in such files. Because you may get a fatal error “function that already exists” if the file will be called anywhere else.
Regards