Skip to content

How do you insert a newsletter subscription form on every post and page? #2

Answered by kaushikgopal
kaushikgopal asked this question in Q&A
Discussion options

You must be logged in to vote

Henry allows you to inject things into the footer via a _footer.html file.

Create a _includes/_footer.html file and the following content:

<form action="https://tinyletter.com/kaush"
      class="newsletter"
      method="post"
      target="popupwindow"
      onsubmit="window.open('https://tinyletter.com/kaush', 'popupwindow', 'scrollbars=yes,width=800,height=600');return true">
    <input type="text" name="email" id="tlemail" placeholder="Enter your email address ..."/>
    <input type="submit" value="Subscribe to my newsletter"/>
</form>

<!-- you probably also want to re-add the original site-nav -->
<nav class="site-nav">
    <ul>
        <li><a class="nav-link" href="/">posts</a></li>

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by kaushikgopal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant