Sign Up Field in Footer
-
Is there any way to have a signup field in the footer of my website? My website does not have a widget-footer section.
I also want this submission to redirect to a thank you page.
I successfully built a newsletter sign up using Katz’s Constant Contact plugin, but unfortunately, through password changes, it’s broken the plugin.
Any help would be greatly appreciated?
-
Hi, you can add the following PHP to the footer section of your theme (replace grp with the appropriate Constant Contact list, btn with the text of the button, and msg with the appropriate success message:
the_widget( ‘sf_widget_constantcontact’, ‘grp=General%20Interest&btn=SUBMIT&msg=Thanks!’ );
Hey!
Thank you SO MUCH for replying to this thread. First of all, you BY FAR have the best Constant Contact plugin on internet at the moment; well done sir!
Alright, so I have a few questions about the footer.
1) My grp name is: Jay Michael – website. How do I format this for the php file?
2) I was able to successfully apply some CSS rules to the subscribe button in the widget. Will I be able to apply the same rule or similar rule to the btn in the footer?
3) Is there any way for me to redirect people to the Thank You page after subscribing? Do I put the html link in the msg field?
P.S.: I also tried adding this code to the Footer.php file and it came out on the front end only showing the code. Thoughts?
<div class="footer_box"><h3>Newsletter</h3> <div class="textwidget">Enter your email address to sign up for Jay's exclusive newsletter.</div> the_widget( 'sf_widget_constantcontact', 'grp=General%20Interest&btn=SUBMIT&msg=Thanks!' ); </div>
Thanks in advance!
1) Simply url escape the group name, like this:
the_widget(‘sf_widget_constantcontact’,’grp=Jay%20Michael%20-%20website&btn=SUBMIT&msg=Thanks!’);
2) Yes, you can also apply css rules to the subscribe button in the footer (the same rule for the widget will probably apply, if you need it different you should target the footer_box class).
3) Right, for example:
the_widget(‘sf_widget_constantcontact’,’grp=Jay%20Michael%20-%20website&btn=SUBMIT&msg=http://thankyoupage.com’);
ps) You probably need to escape out of PHP mode, by wrapping the code with the PHP tags:
?>the_widget(‘sf_widget_constantcontact’,’grp=Jay%20Michael%20-%20website&btn=SUBMIT&msg=http://thankyoupage.com’);<?php
If this plugin works for you, a review would be much appreciated 🙂
I went ahead and put this EXACT code into my footer.php file (below) and it crashed my site/theme editor.
Luckily I back up my site, so I was able to retrieve it, but what should I do to prevent this OR what should I do to get this to work/function properly.
?>the_widget('sf_widget_constantcontact','grp=Jay%20Michael%20-%20website&btn=SUBMIT&msg=http://www.jaymichael.co/thank-you.com');<?php
Sorry, wasn’t thinking correctly and placed the PHP tags in wrong order, it should be:
<?php the_widget(‘sf_widget_constantcontact’,’grp=Jay%20Michael%20-%20website&btn=SUBMIT&msg=http://www.jaymichael.co/thank-you.com’); ?>
This worked!
Thank you, thank you, thank you!
- The topic ‘Sign Up Field in Footer’ is closed to new replies.