Naturally, a stock theme will include a single-field element that allows people to signup for email updates through the homepage. How can you modify this signup bar to direct signups to a page other than back to the home page?
This modification in redirection can be done by including a bit javascript within the layout.html. The steps for accomplishing this are outlined below.
1) Create a custom theme if you haven't already. This tutorial how a custom theme can be created.
2) Within the layout.html file of your custom theme, include the code shown below before the </body> tag. Make sure to replace the [Insert link here] mention with the link you would like the signup bar to redirect the user to.
{% if page.is_homepage? == true %}
<script>
$('#about_page_new_signup_form .submit-button').click(function(){
window.location.href="[Insert Link Here]";
});
</script>
{% endif %}
3) Hit 'Save and publish changes' and test to ensure that modification work as intended. You might need to clear the cache to ensure that the changes are reflected within your test.
Showing 2 reactions
Sign in with