This tutorial provides the code which adds the front page template for widget areas back to the new versions of Monochrome Pro which are coded to use blocks.
The front-page.php file also includes code to add a video background behind the front page 1 widget area replacing the background image added via the customizer.
The video, added via the customizer, displays behind the front page 1 widget & site header on desktops then below the header on smaller screens once the responsive menu is activated.
Demo Video
Shows the front page 1 widget background image replaced with a video added via the customizer and the entire front page widget areas added from the old version of Monochrome Pro to the new block versions.
Installation Steps
There’s 4 steps :
- # Upload the customize.php file to the lib folder replacing the default customize.php file.
- # Copy & paste the PHP code from the functions.php file to the end of your Monochrome Pro themes functions file.
- # Upload the front-page.php file to your Monochrome Pro theme folder like this :
- # Upload the style-front.css file to your Monochrome Pro theme folder like this :
I followed every step, I now have the frontpage widgets back and in the customizer I have the option to set a background video. But after selecting a video in my media library, it shows in the ‘set background video’, I save it, but the video is not displayed.
Please advise.
Hello Daniel. Please link to your live site. Which version of Monochrome Pro are you using?
Note: You can also use this method if using blocks.