There is a fragment with js connection whose task is to get the tabs variable from the front-page.php and custom-page.php
var tabs = Array.prototype.slice.call(document.querySelector("#new-tab .carousel-indicators").children, 0); and for the rest of the villages, the receipt of this variable is not necessary, since This block is not on them and causes a script error. Interested in the question: how to properly test and connect this piece of code?