How do I create a custom partial / template?

I have created an sign up form and placed it in my header:

<div>
<h5 class=”myapp-sign-up-text”>Sign up for updates</h5>
<form class=”myapp-email-form”>
<input type=”text” name=”email” placeholder=”Your email address” class=”myapp-subscription-input” />
<input type=”submit” value=”Subscribe” class=”myapp-subscription-submit” />
</form>
</div>

I would like to use the same code for my footer. Is there a DRY way of putting this into a partial and loading it using a PHP function?

Read more here:: How do I create a custom partial / template?

Leave a Reply

Your email address will not be published. Required fields are marked *