- This topic has 9 replies, 4 voices, and was last updated 4 years, 10 months ago by Dmitry Bychenko.
January 31, 2016 at 2:12 am #169203Dmitry Bychenko
I want to put subscription form after all posts. I mean subscription form to be put automatically after all posts, present and following.
I have this subscription form in right sidebar, it is put there as a widget FeedBurner Email Subscription.
I have this form in footer widget, its put there as a widget as well. easy.
The question is how to put this widget (FeedBurner Email Subscription 1.3.5) after all posts on the blog?
The thing is there is no widget area after the post.
How to get it done?January 31, 2016 at 3:46 am #169229Adrian Cojocariu
Hello. If you have the Generate Hooks addon, try going to the GP Hooks and add your subscription form in the After Content tab. Hope this works.January 31, 2016 at 10:37 am #169370TomLead DeveloperLead Developer
GP Hooks is definitely the way to go.
To make sure it only shows up on single posts, wrap it in this conditional:
<?php if ( is_single() ) : ?> Your subscription form in here <?php endif; ?>
Then make sure Execute PHP is checked.January 31, 2016 at 9:19 pm #169475Dmitry Bychenko
Thanks, Adrian, Thanks, Tom.
Im not great in php, or whatever..
My subscription form is a Widget, i have no idea how to put Widget into After Content tab.
I guess you guys are talking about putting piece of code into After Content tab, not a widget itself.
How to get a code out from widget and put it into After Content tab?
(wrapped by this condition:
<?php if ( is_single() ) : ?>
Your subscription form in here
<?php endif; ?> thats fine, i understand this)January 31, 2016 at 11:42 pm #169493Adrian
You can right click the form in the browser ( Chrome is best for this ) and then click inspect element.
You will then look around until you see the <form> tag, right click and click edit HTML, then copy the code there.
Make sure that you copy the entire form, meaning the text between <form> and </form>, including the <form> tags.
Paste that between the PHP tags in the Hooks, then try to rearange the HTML in case it does not look exactly as you want. It shouldn’t be too hard to figure it out 🙂January 31, 2016 at 11:43 pm #169495Adrian
I also forgot, don’t inspect element for the form inside the WP Dashboard, inspect element for the form your visitors see on the website. That’s the correct code you need. Good luck !January 31, 2016 at 11:48 pm #169497TomLead DeveloperLead Developer
Adrian’s method will work great.
One other option is to use this plugin: https://wordpress.org/plugins/widget-shortcode/
You can then insert the shortcode from your widget into GP Hooks.
Let me know 🙂February 1, 2016 at 12:24 am #169503Dmitry Bychenko
Thank you, guys,
That’s what i got:
<?php if ( is_single() ) : ?>
<form class=”fes fes-default” action=”http://feedburner.google.com/fb/a/mailverify” method=”post” target=”popupwindow” onsubmit=”window.open( ‘http://feedburner.google.com/fb/a/mailverify?uri=tradebonds’, ‘popupwindow’, ‘scrollbars=yes,width=550,height=520’);return true”><label class=”sr-only”><span class=”screen-reader-text”>Email Subscription</span></label><input class=”form-control search-field” type=”text” value=”Ваш Email” onfocus=”if(this.value==’Ваш Email’)this.value=”;” onblur=”if(this.value==”)this.value=’Ваш Email'” name=”email”>
<button type=”submit” class=”btn btn-default btn-submit”>Подписаться</button><input type=”hidden” value=”tradebonds” name=”uri”><input type=”hidden” name=”loc” value=”en_US”></form>
<?php endif; ?>
But there is a problem:
this subscription form is visible from Main Page under all posts, under button Read more…
how to make this form to appear only when you go inside the post, after you press Read more..?
And NOT visible from main page.February 1, 2016 at 12:30 am #169504Adrian
Click the enable PHP button under the Hook in Generate Hooks.February 1, 2016 at 1:10 am #169507Dmitry Bychenko
My fault, i forgot to check Execute PHP.
- This reply was modified 4 years, 10 months ago by Dmitry Bychenko.
- You must be logged in to reply to this topic.