-
Daniella22
Hi
I need to insert my popup opt-in form in my site. Can you tell me where I can put the code, please?
Thank you!
-
Hi there,
1. go to Appearance > Elements -> Add New –> Hook:
https://docs.generatepress.com/article/hooks-element-overview/
2. set the Hook to:
wp_footer
3. set the Display Rules > Location to
Entire Site
or the pages you want to display it on.4. in the editor add your code.
5. Publish the element
-
Daniella22
Hi David,
Thank you for the reply. I’ve set up the option from as you suggested but it’s not working. Here is the domain of my site: allnaturalearth.com. Maybe you can take a look? Thank you again. -
Daniella22
Hi again. I see it’s working, but it’s located in the footer, and it’s static. It’s a popup opt-in form that opens when the readers read the content.
-
Hi there,
Can you elaborate on how you expect this popup to show up? Should it appear when the user opens the post content, or when the user scroll to a certain viewport?
-
Daniella22
Hi, I want the popup to open while the readers read the article. Not right away, though:)
-
The code you have for the pop up – where did it come from ?
As that code i assumed would contain all that is required to make it popup -
Daniella22
Hi David, it comes from Ewaber.
-
Can you share the code here ?
-
Daniella22
Sure
-
Daniella22
<div class=”AW-Form-808410087″></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/87/808410087.js”;
fjs.parentNode.insertBefore(js, fjs);
}(document, “script”, “aweber-wjs-6ssabky3p”));
</script> -
And did Ewebber state it would be a pop-up ? Or do you need to create the pop-up separately ?
-
Daniella22
No, it gives the option in the setting to create a popup within the option form.
-
then i assume the code should automatically work.
Can you add the code to the site using the Element, set it one post, and then provide us a link – we can then check for any obvious errors. -
Daniella22
Yes, I’ll set it up in the hook and send it to you.
-
Daniella22
I’ve set it up in the element, but I don’t see how I can copy the link to send it. The only option the theme gives me is from the element inside the site; I don’t have any URL. How can get the URL?
- You must be logged in to reply to this topic.