The code addition and modification in this tutorial enables you to show a replica of the front page 1 widget on any page or post with a unique background image in the Altitude Pro child theme by StudioPress.
You can also add unique text over each unique image otherwise default text is floated over each image.
The solution in this post extends this tutorial which adds a meta box with checkbox to enable the front page 1 widget on any page or post.
Here’s the demo video showing you exactly what you can do with this tutorial.
The video demonstration shows how you can add a unique image on any page type. If no custom image added, the default is pulled from the images folder.
The image is only displayed if the checkbox is checked otherwise no image is displayed even when a custom image is added.
The checkbox can be coded to display the image by default or only when checked.
There’s 5 steps to follow after you download the zipped folder for logged in members below.
Step 1 : From the download folder, upload the checkbox.php file to the Altitude Pro themes root directory.
Step 2 : From the download folders functions.php file, copy the single line of PHP code to the end of the Altitude Pro themes functions.php file.
Step 3 : From the download folders style.css file, copy the CSS to the end of the Altitude Pro themes style.css file.
Step 4 : From the download folder, upload the output.php file to the Altitude Pro themes lib folder replacing the default output.php file. Additional code has been added between lines 39 – 58 in this file.