Really Simple SSL

Removing Mixed content fixer comment from HTML source

Really Simple SSL adds a HTML comment to the source of your website. Since 2.4 this is a data attribute. This makes it easy to check if the Mixed content fixer is active. This is necessary because sometimes other plugins block the Mixed content fixer. If this comment does not appear, you know there is a conflict.

Some users have asked me how to remove this comment. For those who do not want it there, I have described a way to remove it.

Please note: the automatic detection of plugin conflicts will not work if the comment is removed from the source code.

I’ve created a filter that makes it possible to remove the HTML comment.

Go to your theme’s functions.php in wp-content/themes/your-theme, and open it.

Add the following code:

add_filter("rsssl_fixer_output", "rsssl_comment_remover", 10, 1);

function rsssl_comment_remover($buffer){

//replace the comment with empty string

$buffer = str_replace('data-rsssl=1', "", $buffer);

return $buffer;

}

Don’t forget to clear your cache to see the result!

Rogier

Rogier

Related articles

2 Responses

  1. I have simple SSL and green lock in URL bar but am still confused as to whether everything is right.

    Your plug in says Mixed not recognizing landing page.

    I didn’t see RSS in source code

    Google webmaster recognizes new ssl designation

Leave a Reply

Join our mailing list - 8 Tips & Tricks in your inbox over the next 8 weeks!

Integrate with Really Simple SSL

Really Simple SSL offers a Free SSL Certificate from Let’s Encrypt. Do you want to integrate with Really Simple SSL as a hosting provider? Let us know!

Choose the answer that most closely resembles your proposed integration. Additional information can be entered below.
After sending the form. The pop-up will close automatically.