How to embed Aweber opt in form code in post? (6 posts)

Topic tags: aweber, aweber code
  • I am trying to embed an Aweber code in to my wordpress blog to have the opt in form automatically shows up at the bottom of every posts! I was wondering if it’s possible to have some help?

  • @richardpierre I’ve never done this as I have my opt-in form on the sidebar, but here are a couple ideas: 

    • You could paste the code at the end of each post in the HTML section of the WYSIWYG editor. 
    • Look for a shortcode plugin that allows you to post a shortcode after your posts which automatically pulls your Aweber code into it (I think you could use Shortcode Exec PHP for this)

    Hope this helps a little, keep us posted on what you find that works.

  • @richardpierre

    See http://www.aweber.com/faq/questions/241/How+Do+I+Integrate+My+Wordpress+Blog+With+AWeber%3F

    You will likely need to edit your singlepost.php file to include the form.  It is tricky and we needed to hire a developer to make it work for us

  • @richardpierre It all depends on whether you are using a self-hosted version of WordPress (on your own domain) or using WordPress.com.  Also, the theme you use will be a factor.  Could you specify the WordPress version and theme you are using?

  • Thanks a lot for your help guys I really appreciate that. I am using a self-hosting version of Wordpress 3.3.1 with a premium Woo Headlines theme. 

  • @richardpierre I’ve never used Woo Themes, but I assume it is a pretty standard theme.  You will want to do what @mike-stelzner suggested.  Go to your dashboard > Appearance > Editor, and in the right hand side, look for the Single Post template (single.php).  

    Somewhere in that template, you should see <?php the_content(); ?>

    After that, add two line breaks <br /><br /> and then try adding the Javascript Snippet version of your Aweber form which should look like <script type=”text/javascript” src=”http://forms.aweber.com/form/01/123456789.js”></script> and then add another <br /><br /> after it.  That *should* put the form right after your post content and before the comments box. 

    In the off chance that your theme doesn’t like it and you can’t get back into your dashboard (shouldn’t happen, but just in case), make sure you have a fresh copy of that single.php file and access to FTP ready.  You can upload the fresh copy over the copy you just edited under the wp-content folder, themes folder, your theme folder.  Once you overwrite the edited version with the original version that you downloaded, everything will work again.  


Add your voice to the discussion

Existing members: . If you do not have a SME account, .