embedding a signup form at the bottom of each post

Community Forums Forums Design Tips and Tricks embedding a signup form at the bottom of each post

This topic is: not resolved

This topic contains 4 replies, has 2 voices, and was last updated by  Nick Ellison 1 year, 7 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #31101

    Nick Ellison
    Participant
    Post count: 13

    Hi. I’m trying to embed a Aweber signup form at the bottom of every blog post automatically. I’m using Genesis simple hooks to do it.

    The problem I’m having is that the form is also showing up on the homepage under each excerpt. Could someone help me stop this part from happening please? I’m told I can combine my code with a wordpress conditional like is_single() but quite honestly I have no idea what that means as I can’t code.

    Here is my form: <script type=”text/javascript” src=”http://forms.aweber.com/form/51/1674181151.js”></script>

    Would anybody be able to show me where the code goes please? Or if there is another way to achieve this.

    Thanks

    Nick

    #31102

    braddalton
    Participant
    Post count: 10351

    Can you link to your site please.

    Adding the conditional tag,  is_single() will restrict the output to single posts only.

    Rather than use Simple hooks, you could add a widget area after all single posts and drag in the Genesis eNews extended widget or Aweber form plugin/code.

    Here’s the PHP code you can add to the end of your child theme’s functions.php file.

    You can easily change the location where the widget content displays by changing the genesis hook.


    #32791

    Nick Ellison
    Participant
    Post count: 13

    Hi Brad. So sorry I never realised you had replied. Thank you so much for helping out.

    My site is http://www.nickellison.net

    I took your advice and code and added it the function.php file. It’s 99% working! I just have an alignment issue. Instead of the sign up form sitting directly under the post it sits right in the middle of the site, crossing half of the post and half of the sidebar. Is there an easy fix for that? (I’ve taken it down so you won’t be able to see it but here’s a screenshot http://nickellison.net/wp-content/uploads/2013/04/Screen-shot-2013-04-03-at-10.33.58.png

    One other issue is that I’m inserting the aweber code straight into the text widget, so it’s not mobile responsive as per the theme. Do you know of a way I can either make it respond or replace it for a different form when opened on mobile?

    Thanks for your help

    Nick

    #32802

    braddalton
    Participant
    Post count: 10351

    That has to do with the aligment of your form.

    You can fix this many ways but try pasting the code for the form into your WordPress text editor and aligning it left or align none.

    Why not use the Aweber plugin and drag the widget into your new area.

    Is the Aweber plugin responsive?


    #32916

    Nick Ellison
    Participant
    Post count: 13

    Hi Brad

    I just tried doing it that way. Got the aweber plugin and got it all connected up ok but had the same problem, the form was centered in the middle of the site for some reason. Anyway I went back to the other way of using the after_content_hook but this time I used the full html instead of the javascript snippet and it seems to be working just fine.

    Still not mobile responsive, but neither was the aweber plugin. Not sure what to do about that bit…

    If you have any ideas I’d appreciate the help, but not to worry if not, at least it works on desktop so far!

    Thanks again

    Nick

     

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.