Comodo Trust Logo Code Breaks Preview

I’m trying to add the Comodo Trust Logo code into my footer in X Pro. I’ve added a container and a text element, then pasted the two provided codes from Comodo’s site. It shows perfectly fine on the page, however it instantly breaks the preview area of the editor.
I’m assuming the javascript that the code snippets are linking to is causing the problem. I’ve found another post here saying to use the RAW content element, but that is not available for footers. I’ve also tried adding the code to the footer.js but it will not bring up the trust logo image that way.

Hello There,

Thanks for writing in! I have checked your code and it is valid and correct. When I tested the code in my local testing server, I can confirm that the code will break the footer builder. To resolve this issue, it is advisable that the commodo logo code will be transform into a shortcode like [commodo_logo] and this will be used in a content area or text element. To do that, we need to use a custom code added to the theme. Because what you are trying to accomplish requires a template customization, we would highly to suggest that you use a child theme. This allows you to make code changes that won’t be overwritten when an X update is released.

After the child theme is set up, please add the following code in your child theme’s functions.php file

// Custom Commodo logo shortcode
// =============================================================================
add_shortcode("commodo_logo", "commodo_logo_shortcode");
function commodo_logo_shortcode() { ?>
  <?php ob_start(); ?>

    <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>
    <script language="JavaScript" type="text/javascript">
      TrustLogo("https://wcpu-homepage-media.s3.amazonaws.com/2017/12/comodo_secure_seal_100x85_transp.png", "CL1", "none");
    </script>
    <a  href="https://www.positivessl.com/" id="comodoTL">Positive SSL Wildcard</a>

  <?php return ob_get_clean(); ?>
<?php }
// =============================================================================

You can then use like a normal shortcode added in the footer builder.

Hope this helps. Please let us know how it goes.

I’ve done that and still getting the issue. I am using ConvertFox as well and used this same method to change that code into a shortcode to see if that made a difference, but has not. I’m providing the code for that in a note, see if it gives you the same results.
The ConvertFox code has been on there for a while without issue, so maybe a conflict between the two?

Hello There,

Could you please provide the code for the ConvertFox bubble so that I can test it in my local testing server?

By the way, I was able to check your site and the Commodo logo seems working perfectly.

Thanks in advance.

I provided the convertfox code in the secure note of my recent post.

Hello There,

I was able to test the code and I can confirm it broke the footer builder. This is because script tags is not suppose to be inserted in a content area or even in text element. It should only be inserted in a raw text element which is regretfully not available for now. I have added this as a feature request for a raw content element for the header/footer builders to easily insert a code and would make the builder more flexible. Our developers is already made aware of this request. Once they’ll have it integrate with the builder, it will be updated and will be rolled out in one of the release updates.

Thank you for your understanding.

Sounds good to me. Thanks for the support :sunglasses:

You are most welcome!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.