I tried it, the gallery functions, but it did not solve my problems. Maybe the correct changes in the code would solve this.
After adding the code to the functions.php file, lightbox opened with use magnifier icon, which is next to the image. However, this has not returned the layout page
How did I get the code correct so that everything worked as before with the new versions?