Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #660563

    Hello,

    I just installed a Comodo SSL on my site https://digitalproductpro.com/
    and wanted install their sticky logo to my site as seen here https://www.positivessl.com/?key5sk1=46eb760a1562d1d30eb5fad165cefafd99da1452

    They gave me the instructions here https://trustlogo.com/install/index9.html?url=https://digitalproductpro.com/wp-content/uploads/2016/07/comodo_secure_seal_100x85_transp.png&certname=Positive-SSL
    but I’m not sure how to paste the code before </BODY> tag
    I think I installed the code before </HEAD> tag correctly but could you tell me
    were to paste see codes within my editor.

    Thanks

    #660809

    Hi marketwithmichael,

    Try the following in your functions.php file:

    function add_custom_code_header() { ?>
    <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>
    <?php }
    add_action('wp_head', 'add_custom_code_header');
    
    function add_custom_code_footer() { ?>
    <script language="JavaScript" type="text/javascript">
    TrustLogo("https://digitalproductpro.com/wp-content/uploads/2016/07/comodo_secure_seal_100x85_transp.png", "CL1", "none");
    </script>
    <a  href="https://www.positivessl.com/" id="comodoTL">Positive SSL</a>
    <?php }
    add_action('wp_footer', 'add_custom_code_footer');

    Thanks,
    Rikard

    #660971

    I’m not sure what happened but the pasted the code you sent and it caused my site to go down showing this error message.

    Parse error: syntax error, unexpected ‘?’ in /home4/mmiller/public_html/digitalproductpro.com/wp-content/themes/enfold/functions.php on line 556

    #661239

    Hi,

    Please send us a temporary admin login so that we can have a closer look. You can post the details in the Private Content section of your reply.

    Thanks,
    Rikard

    #982125

    Hi Rikard,

    How would I do this on the cart or checkout page?

    • This reply was modified 5 years, 10 months ago by Rgrant74.
    #982387

    Hi Rgrant74,

    You can try something like this to place it on the cart page:

    function add_custom_code_header() { 
    if(is_cart()) {
    ?>
    YOUR SCRIPT GOES HERE
    <?php 
    }
    }
    add_action('wp_footer', 'add_custom_code_footer');

    Best regards,
    Rikard

    #982467

    Hi Rikard, The code gave me an error in my footer area. I may have placed it in the wrong place, but it’s ok, after posting my original reply I did find a way to do it.

    I then tried to add the secure site image after the add to cart button but I have an issue with the picture duplicating. I posted my query here..https://kriesi.at/support/topic/duplicating-content/

    Is there anyway you can have a look and reply? My site goes LIVE tomorrow and this is the last issue (I hope)

    Thanks so much

    #982642

    Hi Rgrant74,

    It looks like Mike helped you out in your other thread. We’re good in this thread then, right?

    Best regards,
    Rikard

    #982645

    Yes. Tahn you Rikard. You’ve been a great help

    #982656

    Hi,

    Thanks for the feedback. I’ll go ahead and close this thread now since it’s more than 2 years old.

    Best regards,
    Rikard

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘Install Code before tag and before tag’ is closed to new replies.