How to add content warning to single post



 If you have a post that Blogger does not meet the conditions, and no doubt you have, use this code instead of the Blogger site warning.
Just create a new post and insert the code.

<script type="text/javascript">
{
var r=confirm("The page you are about to view may contain content only suitable for adults. Press Ok to continue or Cancel to be redirected to the homepage.");
if (r==false)
{
document.location.href="PAGE TO BE REDIRECTED TO";
}

}
< /script>


Of course you can change the text!

No comments:

Post a Comment