Mark Collier
Member
Posted 10 months ago #
I would like to add a horizontal email subscription box to the post and page templates so that I don't have to add it manually in the HTML each time I create a post.
The code is:
<iframe src="http://www.theopenalgorithm.com/forms/horizontalform.html" frameborder="0" scrolling="no" height="" width="500">
</iframe>
How can I add this to the code so that it shows up below my posts and pages?
Thanks for your help in advance.
Put it in your theme template. It should be single.php, depending on your theme.
Mark Collier
Member
Posted 10 months ago #
Hi Ipstenu
Thanks, I tried that and I got a fatal error, when I removed the code and updated the file again it was back to normal.
What theme are you using?
If it's causing a fatal error, then either you put it in a bad place or the content of the frame is evil.
Mark Collier
Member
Posted 10 months ago #
Something like this should work: http://pastebin.com/c5tehCtU
Depends on where in the post you want it, though.
Mark Collier
Member
Posted 10 months ago #
Thanks very much I really appreciate the help, I have updated the file.
Is there any way to move the iframe/subscription box to just below the content?
Sure :) Move it from line 25 to line 19
Like this: http://pastebin.com/s1L4wL4R
I suspect you were putting it inside the PHP tags, which would have weird effects ;)
Mark Collier
Member
Posted 10 months ago #
Didn't quite work see: http://www.theopenalgorithm.com/other/why-you-shouldnt-monetize-your-new-blog/
I have a feeling that: <?php
the_content();
wp_link_pages();
?>
essentially mean the body and the plugins below the post.
Is that correct?
If so do I need to edit another file with those plugins to have the email subscription box show up above the related posts and just below the content?
Thanks
Mark
the_content() is the call to ... your content :) That's what WP uses to echo your post.
It is showing below your content, but you have other plugins and theme settings that are causing it to be bumped down.