That code is part of alora theme’s main.js and I have no idea which plugin or script that you added breaks it.
Theme4Press Core plugin is our plugin, this will not cause any issue.
You will have to deactivate all other plugins or any code that you added.
Our demo, which is in wide layout works properly. http://demo.theme4press.com/alora/portfolio-grid/
So it has to be something you added or modified that is incompatible.
Sorry, I have no idea what is causing this issue.