Community Forums › Forums › Archived Forums › Design Tips and Tricks › Add Optin above Widgetized Footer
- This topic has 9 replies, 2 voices, and was last updated 11 years, 2 months ago by SoZo.
-
AuthorPosts
-
February 4, 2013 at 8:14 am #17830PainterMommyMember
I have created an optin for a client and added it above the footer using the Genesis Simple Hooks plugin, but the client now wants the optin to be above the widgetized footer instead. How would I accomplish that? The site is http://www.soulfitwomen.com
Thanks so much!
DAWN
February 4, 2013 at 9:17 am #17851SoZoMemberYou could try the after_content_sidbear hook.
John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography
February 4, 2013 at 9:31 am #17864PainterMommyMemberI appreciate you getting back to me. The only one I see is "
genesis_after_content_sidebar_wrap
" and that one doesn't do it. It then gets pushed up behind the video.This is the code I am working with:
<br>
<div style="height: 120px; background:url(http://www.soulfitwomen.com/wp-content/uploads/2013/02/wide_optin_back_small.png) no-repeat center top;">
<form action="https://app.getresponse.com/add_contact_webform.html"
method="post">
<table style="margin-left:450px;" cellpadding="0" cellspacing="0" border="0"><tr>
<td align="top" style="padding-right:10px;"><input type="text" value="Name" name="name"></td>
<td align="top" style="padding-right:10px;"><input type="text" value="Email" name="email"></td>
<td align="top"><input type="image" src="http://www.soulfitwomen.com/wp-content/uploads/2013/02/submit_circle_small.png" background="none" WIDTH="101" HEIGHT="100" border="0"
name="submit"></td>
</tr></table>
<input type="hidden" name="webform_id" value="340984">
</form>
</div>
<script type="text/javascript" src="http://app.getresponse.com/view_webform.js?wid=340984&mg_param1=1"></script>February 4, 2013 at 9:34 am #17867SoZoMemberOk, since you can't do priority numbers in simple hooks you'll need to add a function to the functions file using the before_footer hook with a priority number so it outputs before the footer widgets.
John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography
February 4, 2013 at 9:45 am #17870PainterMommyMemberCan you tell me the specific code I should add? I am still a novice when it comes to this stuff. I appreciate it so much.
February 4, 2013 at 9:50 am #17872SoZoMemberThe intro to hooks shows what a function looks like and you can learn about the add_action parameters here.
You'd want something like
add_action('genesis_before_footer', 'add_div', 5 ); function add_div() { THE STUFF YOU WANT TO OUTPUT }
John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography
February 4, 2013 at 9:57 am #17876PainterMommyMemberOK, so I added this to the functions.php and it broke the site:
/** Add Wide Optin above Footer Widgets*/
add_action('genesis_before_footer', 'add_div', 5 );
function add_div() {
<div style="height: 120px; background:url(http://www.soulfitwomen.com/wp-content/uploads/2013/02/wide_optin_back_small.png) no-repeat center top;">
<form action="https://app.getresponse.com/add_contact_webform.html"
method="post">
<table style="margin-left:450px;" cellpadding="0" cellspacing="0" border="0"><tr>
<td align="top" style="padding-right:10px;"><input type="text" value="Name" name="name"></td>
<td align="top" style="padding-right:10px;"><input type="text" value="Email" name="email"></td>
<td align="top"><input type="image" src="http://www.soulfitwomen.com/wp-content/uploads/2013/02/submit_circle_small.png" background="none" WIDTH="101" HEIGHT="100" border="0"
name="submit"></td>
</tr></table>
<input type="hidden" name="webform_id" value="340984">
</form>
</div>
<script type="text/javascript" src="http://app.getresponse.com/view_webform.js?wid=340984&mg_param1=1"></script>
}I fixed via FTP, but I am thinking my code is not correct?
February 4, 2013 at 10:09 am #17890SoZoMemberYa, you threw HTML into PHP. You need to break out of PHP first. See the difference between this and what I posted above
add_action('genesis_before_footer', 'add_div', 5 ); function add_div() { ?> THE STUFF YOU WANT TO OUTPUT <?php }
John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography
February 4, 2013 at 10:27 am #17898PainterMommyMemberIt worked! It worked! Thankyou so much!
February 4, 2013 at 10:28 am #17899SoZoMember -
AuthorPosts
- The topic ‘Add Optin above Widgetized Footer’ is closed to new replies.