This could be caused by a plugin interfering with the theme, modifications in the theme or custom code entered in theme panel or theme files. Please deactivate all plugins if possible, leave only theme plugins active. Temporarily remove any custom code or theme modifications and make tests.
Sorry for this delay, please provide some more details about the code you were using, what is it supposed to do.
The first code you mention will hide the website if used, the whole body will be hidden. The other I am not sure what it does exactly.