Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1004027
    mattheltzel
    Participant

    Hi 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/&#8221; : “http://www.trustlogo.com/&#8221;);
    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&#8221;, “SC5”, “none”);
    </script>
    EV SSL

    Hope this makes sense. Can you help with this?

    #1004059
    Rupok
    Member

    Hi 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!

    #1004176
    mattheltzel
    Participant

    Hi 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/8SC809OR

    With 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,
    Matt

    #1004200
    mattheltzel
    Participant

    I 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.

    #1004521
    Rue Nel
    Moderator

    Hello 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/b7a7en

    #1005069
    mattheltzel
    Participant

    Thank 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.

    #1005113
    Christopher
    Moderator

    Hi 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.

    #1005132
    mattheltzel
    Participant

    I’ve got it all figured out! Thanks so much!

    #1005164
    Christian
    Moderator

    You’re welcome. 🙂

  • <script> jQuery(function($){ $("#no-reply-1004027 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>