Tagged: 

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #466328

    Good day!

    I am trying to install an Aweber Pop over form on the homepage of this site http://refuze.com/. I’m supposed to paste the javascript code anywhere between the body tags of my site but I couldn’t find where it is. In the meantime I have used a plugin (HTML Javascript Adder) and added the widget in Displayed Everywhere. The pop over form did appear on other pages except the home page.

    If you can let me know where to insert the code on the theme editor or if I need a specific plugin, I would greatly appreciate it.

    Thanks!

    #466983

    Hi sethriley!

    Your homepage does not have a sidebar. Is that why it’s not displaying?

    If you want to add it to every page of your site then add this to the bottom of your functions.php file (preferably in a child theme).

    add_action( 'wp_footer', 'enfold_customization_footer_scripts' );
    function enfold_customization_footer_scripts() {
    ?>
    paste your script here
    <?php
    }

    Best regards,
    Elliott

    #467062

    Hi Elliott!

    Thanks for your help! I can now have the form on my homepage.

    By the way, in case I don’t want it shown on specific pages or vice versa, what do I need to do? There are some pages that I don’t want the aweber form on.

    Looking forward to your assistance.

    Thanks in advance.

    #467098

    Hi!

    Please change your code to following one

    add_action( 'wp_footer', 'enfold_customization_footer_scripts' );
    function enfold_customization_footer_scripts() {
    if(is_page(array(2,3,4,5))){
    ?>
    paste your script here
    <?php
    }
    }

    2,3,4 etc. here are page ID’s. You can replace those ID’s with the pages you would like to echo the code

    Regards,
    Yigit

    • This reply was modified 9 years, 4 months ago by Yigit.
    #475336

    Hi Yigit,

    I edited the code with the one you gave me and substituted the page IDs 444 and 447 as these are the only pages I want the form to show up. The final code looks like this:

    add_action( ‘wp_footer’, ‘enfold_customization_footer_scripts’ );
    function enfold_customization_footer_scripts() {
    if(is_page(array(444,447)){
    ?>
    <div class=”AW-Form-532465058″></div>
    <script type=”text/javascript”>(function(d, s, id) {
    var js, fjs = d.getElementsByTagName(s)[0];
    if (d.getElementById(id)) return;
    js = d.createElement(s); js.id = id;
    js.src = “//forms.aweber.com/form/58/532465058.js”;
    fjs.parentNode.insertBefore(js, fjs);
    }(document, “script”, “aweber-wjs-2e16n2lax”));
    </script>
    <?php
    }
    }

    However I got an error which says:

    Parse error: syntax error, unexpected ‘{‘ in /home/content/61/8514261/html/wp-content/themes/enfold/functions.php on line 522

    I went to the file manager and this is line 522:
    if(is_page(array(444,447)){

    When I used the first code given to me the form shows up okay. However I only need it on these two pages:
    http://refuze.com/
    http://refuze.com/blog/

    Can you please help me out?

    Thanks in advance!

    #475606

    Hey!

    It looks like the if there’s a missing ) at the end, try replacing it with:

    if(is_page(array(444,447))) { 
    

    Regards,
    Rikard

    #476323

    Hi Rikard,

    Thanks for the help. However, I no longer get the error on my website but the form is not showing anymore on the pages I want it on or any page in particular.

    #476438

    Hi!

    Yes, there was a missing ) in my code, i fixed it. Do you mind creating a temporary admin login and posting it here privately so we can look into it?

    Regards,
    Yigit

    #476845

    Hi Yigit,

    I have provided you a temporary admin login. Details below:

    #478192

    Hi.

    Any update on my issue (#476845)? I have provided the login details already. Would appreciate your response.

    Thanks.

    #478438

    Hi!

    Are you running Adblock (or similar)?

    Best regards,
    Josue

    #478727

    Hi Josue,

    I don’t think so.

    Also I am using a pop-over form which can be seen on all the pages if I use the first code given to me. The problem is on the second code which is supposed to have the form show up on specific pages. The code given to me on #466983 above works but it is not what I need right now because the form keeps popping up on all page and post. I only want it on specific pages and the code given to me for that doesn’t work.

    I really need your help with this as I am running a campaign and it’s been a week already since I had this issue.

    Thanks in advance.

    #478796

    Hello,

    I guess what you want is to show the popup in the homepage (444) and the blog (447) right? it should be like that right now, the problem was that the blog (447) is not read as a “Page” (because it was set as the WordPress “Blog”) so trying to catch it with the is_page conditional won’t work, here’s what i used:

    if(is_page(array(444)) || is_home()){
    

    Regards,
    Josue

Viewing 13 posts - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.