Tagged: x
-
AuthorPosts
-
November 16, 2016 at 10:12 am #1259517
omkar13ParticipantHi,
I removed the default comment section i.e ‘Leave a reply’ section from all my posts and replaced it with the new contact form 7. previously “Book now” internal links on the posts used to point to the comment section at the bottom of the page, but these links are no more pointing to the new contact form 7.Link for example :http://emailholidays.com/bellagio-las-vegas
If you click on “Book Now” link it does not go to the comment section of the page.
I was using #book do the same.Is there any way to fix that on all the posts at once , instead of doing it manually on each post.
I have used below code in functions.php.
/Contact form on every posts function contactform_for_every_post( $content ) { if ( is_singular('post') ) { $contactform = '[contact-form-7 id="8165" title="Inquiry For Quote"]'; echo '<h3>Get a free custom made Holiday Quote. Enquire below:</h3>'; echo do_shortcode($contactform); } } add_action('x_before_the_content_end', 'contactform_for_every_post');Is there any way i can provide Id to my contact form through above code.
Thanks in advance.
November 16, 2016 at 11:47 am #1259667
RupokMemberHi there,
You can just add an ID to the h3 headline you have added :
/Contact form on every posts function contactform_for_every_post( $content ) { if ( is_singular('post') ) { $contactform = '[contact-form-7 id="8165" title="Inquiry For Quote"]'; echo '<h3 id="contact">Get a free custom made Holiday Quote. Enquire below:</h3>'; echo do_shortcode($contactform); } } add_action('x_before_the_content_end', 'contactform_for_every_post');Now you can use #contact to point the form.
Cheers!
November 17, 2016 at 3:33 am #1260744
omkar13ParticipantHi Rupok,
That resolved the issue.
Thank you very much for support.November 17, 2016 at 5:01 am #1260831
DarshanaModeratorGlad we were able to help 🙂
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1259517 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
