I recently received a support ticket from someone wanting to set the Pretty Happy subscribe widget to just appear on the home page. By default, the Pretty Happy theme displays the subscribe widget above the content on every page.
In order to accomplish this, we need to create a front-page.php file, which the Pretty Happy theme does not use.
To get started, we will need to delete the subscription widget from our functions.php file. Look for this:
Then, create a new file using a code editor like Textpad and name it front-page.php
Paste in the code shown below and upload the new file to your Pretty Happy theme folder on your hosting site (via FTP or cPanel).
This code adds the subscribe widget specifically to the front page of the Pretty Happy theme above blog posts. By adding a front-page.php file, you also now have the flexibility to add a slider or other widget to your home page.
Interested in incorporating something like this to your Pretty Happy site? Shoot me a note!