Tagged: x
-
AuthorPosts
-
June 16, 2016 at 3:14 am #1044776
JurgaRParticipantHi, I’ve noticed that the title of Mailchimp forms has H1 tag assigned to it. I’ve just added subscription forms to each of my posts and multiple H1 tags is a big problem. Is there a way to change this – i.e. keep the Mailchimp form title, but change it to H4 or H5.
A second question. Is it possible to add more text to the Mailchimp forms – it would look something like this: TITLE, under it some text, and then name and e-mail fields.
Thanks a lot.
Best regards, JurgaJune 16, 2016 at 3:38 am #1044806
Paul RModeratorHi Jurga,
Thanks for writing in!
You can change h1 by editing directly the file shortcode-x-subscribe.php located in
wp-content/plugins/x-email-mailchimp/email-integration/views/siteThe h1 title tag is located at line number 129.
You can also add your additional text under it.Just note that this changes will get overwritten on plugin update.
I will forward this concern to our web development team for review.
June 16, 2016 at 3:55 am #1044833
JurgaRParticipantHi there, thanks. I have a child theme installed. Can I make these changes using the child theme, so that it doesn’t get overwritten? If so, how?
Also, if I add any text as you suggest, it will probably appear on all Mailchimp forms throughout my site. Is it possible to do this per form?
Thank again.
Best regards, JurgaJune 16, 2016 at 4:55 am #1044910
LelyModeratorHello Jurga,
We can change it on the fly using javascript. Try adding this code on Appearance > Customize > Custom > Edit Global Javascript:
jQuery ( function( $ ) { $( "#x-subscribe-form-1808 > h1" ).replaceWith( "<h4>DON'T MISS OUR TRAVEL TIPS AND UPDATES</h4>" ); });Hope this helps.
June 16, 2016 at 5:07 am #1044923
JurgaRParticipantThanks, that worked. But the title lost all the formatting – the colour for example. Also, there is extra padding space visible… Is there a way to change this while keeping the formatting?
Thanks a lot for your help!June 16, 2016 at 5:30 am #1044952
DarshanaModeratorHi there,
Please replace the above JavaScript code with the following.
jQuery ( function( $ ) { $( '#x-subscribe-form-1808 > h1' ).replaceWith( '<h4 class="mtn" style="color:#fff;">DO NOT MISS OUR TRAVEL TIPS AND UPDATES</h4>' ); });Hope that helps.
June 16, 2016 at 6:06 am #1044982
JurgaRParticipantThanks, but this doesn’t work. The formatting is correct, but the inspector shows that the title still is h1 and not h4… Actually, this second code doesn’t do anything – I’m seeing the form the way it is. I know this because if I change the text, it doesn’t change in the form.
Thanks for trying with me!June 16, 2016 at 8:55 am #1045201
DarshanaModeratorHi there,
Did you remove the earlier code and add the next one? Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:
– Link to your site
– WordPress Admin username / password
– FTP credentialsDon’t forget to select Set as private reply. This ensures your information is only visible to our staff.
June 16, 2016 at 9:55 am #1045282
JurgaRParticipantI found what the problem was. I was using a quote sign – don’t instead of do not and therefore the code didn’t work. I removed the quotes and it works now. Thanks a lot for your help, guys! Appreciated!
June 16, 2016 at 11:12 am #1045426
Nabeel AModeratorGlad we could help.
Cheers!
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1044776 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
