Add Email Optin Form Block To Hero Header In Essence Pro

By default, the Essence Pro themes front page header hero section displays 2 buttons. In this tutorial, you’ll get :

  1. A custom reusable block you can import.
  2. And a file named blocks.php you can upload to display your reusable email optin block like this :

Note : The code in the blocks.php file shows you how to use a few lines of PHP code to display any block in any location in any theme.

Demo Video

Shows you how to integrate your MailChimp email form in the header hero section on the front page of the Essence Pro child theme by StudioPress.

Also provides the PHP code snippet which shows you how to display a block in any hook position using PHP code.

Installation Steps

There’s 2 steps once you’ve setup your email newsletter block using the Genesis Blocks plugin:

Note : This solution assumes you’re using MailChimp API keys in the Genesis Blocks > Settings > Newsletter Block settings.

You can access your reusable blocks page using these steps :

  1. # Find your MailChimp audience I.D and edit the newsletter-optin.json file with the 10 digit mailingList number. On your Reusable blocks page, import the newsletter-optin.json file. Once imported, edit the block to grab the post id from the address bar which you’ll need in step 2.
  2.  

  3. # Edit the file named blocks.php on line 66 replacing the 83 with the id for your reusable block as seen using the 1st red arrow in the screenshot in step 1. You can then upload the file to your Essence Pro themes blocks folder.
  4.  

Download Folder

Related Tutorials

Was This Tutorial Helpful?

Free

$0

Access only to all free tutorials per month.



Monthly

$75

Access to 10 premium tutorials per month.


Tutorial Request


Includes code guarantee and coding support.

Yearly

$500

Access to 15 premium tutorials per month.


Monthly Tutorial Request


Includes code guarantee and priority coding support.