Tagged: x
-
AuthorPosts
-
May 22, 2016 at 12:59 pm #1004027
mattheltzelParticipantHi all,
I’m trying to install the floating Comodo Floating Trust Logo in the bottom right hand of my website. I’m having a couple issues, and need some help:
1. I only want it on this page: https://renaissancepassport.com/checkout
2. I tried to add the scripts to my child theme’s functions.php but I saw some instructions on another forum post that said to post the scripts directly before the /head and /footer codes. However, in the child theme’s functions.php those don’t exist, so I’m not sure how to do that.Here are the scripts comodo gave me:
Before </head> tag:
<script type=”text/javascript”>//<![CDATA[
var tlJsHost = ((window.location.protocol == “https:”) ? “https://secure.comodo.com/” : “http://www.trustlogo.com/”);
document.write(unescape(“%3Cscript src='” + tlJsHost + “trustlogo/javascript/trustlogo.js’ type=’text/javascript’%3E%3C/script%3E”));
//]]>
</script>Before </body> tag:
<script language=”JavaScript” type=”text/javascript”>
TrustLogo(“http://www.renaissancepassport.com/wp-content/uploads/2016/05/comodo_secure_seal_113x59_transp-1.png”, “SC5”, “none”);
</script>
EV SSLHope this makes sense. Can you help with this?
May 22, 2016 at 1:36 pm #1004059
RupokMemberHi there,
Thanks for writing in! You can use a plugin like this to add script to header and footer easily – https://wordpress.org/plugins/header-and-footer-scripts/
If you want to use Child Theme, then you can follow this – https://community.theme.co/forums/topic/add-tracking-code-to-header/#post-776299
Hope this helps.
Cheers!
May 22, 2016 at 5:27 pm #1004176
mattheltzelParticipantHi Rupok. I tried both using the Header and Footer Scripts plugin and the child theme route, and I couldn’t get it to appear floating in the bottom right corner like it’s supposed to.
As you can see, with the Header and Footer Scripts plugin, it just messes up my footer:
http://screencast.com/t/8SC809ORWith the child theme route, in the child theme functions.php file there isn’t a </head> or </body> tag, thus I cannot place them precisely where they need to be. What should I do?
Thanks,
MattMay 22, 2016 at 6:10 pm #1004200
mattheltzelParticipantI also added _header.php and _footer.php files to my child theme and inserted them directly above the </head> and </body> tags just as the instructions describe… This gives me the same result.
May 22, 2016 at 10:23 pm #1004521
Rue NelModeratorHello There,
To resolve this issue, you must first remove all the code you may have added. All you need is the code below to display the trust logo at bottom right of the checkout page only.
// Add trust Logo JS // ============================================================================= function add_trustlogo_js(){ ?> <?php if ( is_page('checkout') ) : ?> <script type="text/javascript"> //<![CDATA[ var tlJsHost = ((window.location.protocol == "https:") ? "https://secure.comodo.com/" : "http://www.trustlogo.com/"); document.write(unescape("<script src='" + tlJsHost + "trustlogo/javascript/trustlogo.js' type='text/javascript'></script>")); //]]> </script> <?php endif; ?> <?php } add_action('wp_header', 'add_trustlogo_js'); // ============================================================================= // Add the Trust Logo // ============================================================================= function add_trust_logo() { ?> <?php if ( is_page('checkout') ) : ?> <div id="trust-logo" style="position: fixed; right: 10px; bottom: 5px;"> <script language="JavaScript" type="text/javascript"> TrustLogo("http://www.renaissancepassport.com/wp-content/uploads/2016/05/comodo_secure_seal_113x59_transp-1.png", "SC5", "none"); </script> <!-- <a href="https://ssl.comodo.com/ev-ssl-certificates.php" rel="nofollow">EV SSL</a> --> </div> <?php endif; ?> <?php } add_action('wp_footer', 'add_trust_logo'); // =============================================================================And this should be the result (provided that you remove all your previous codes)
http://prntscr.com/b7a7enMay 23, 2016 at 7:19 am #1005069
mattheltzelParticipantThank you!!! Is there any reason it floats like 50px from the right? Just curious if I can get it to sit in the very far right of the browser so it doesn’t cover up words. I can adjust the padding on my columns if need be, but I’d rather not.
May 23, 2016 at 7:43 am #1005113
ChristopherModeratorHi there,
Please updat your code to :
// Add trust Logo JS // ============================================================================= function add_trustlogo_js(){ ?> <?php if ( is_page('checkout') ) : ?> <script type="text/javascript"> //<![CDATA[ var tlJsHost = ((window.location.protocol == "https:") ? "https://secure.comodo.com/" : "http://www.trustlogo.com/"); document.write(unescape("<script src='" + tlJsHost + "trustlogo/javascript/trustlogo.js' type='text/javascript'></script>")); //]]> </script> <?php endif; ?> <?php } add_action('wp_header', 'add_trustlogo_js'); // ============================================================================= // Add the Trust Logo // ============================================================================= function add_trust_logo() { ?> <?php if ( is_page('checkout') ) : ?> <div id="trust-logo" style="position: fixed; right: -12px; bottom: 41px;"> <script language="JavaScript" type="text/javascript"> TrustLogo("http://www.renaissancepassport.com/wp-content/uploads/2016/05/comodo_secure_seal_113x59_transp-1.png", "SC5", "none"); </script> <!-- <a href="https://ssl.comodo.com/ev-ssl-certificates.php" rel="nofollow">EV SSL</a> --> </div> <?php endif; ?> <?php } add_action('wp_footer', 'add_trust_logo'); // =============================================================================Hope it helps.
May 23, 2016 at 7:57 am #1005132
mattheltzelParticipantI’ve got it all figured out! Thanks so much!
May 23, 2016 at 8:21 am #1005164
ChristianModeratorYou’re welcome. 🙂
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1004027 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
