Hello Guys! How are you? I hope you are all doing good. Welcome Freemium Tech website's today's article. Today we will discuss about how to protect Specific part of content by Password? So if you have to need protect any specific part of content by password then this article must help you.
What is specific password protected content?
This is a script by which we can protect a specific part of the content by password. If you want to hide one paragraph of the whole content then this script will help you to do that. You can set password as your wish. After set password you can provide it to your premium subscribers. Only those visitors can read or look this content whom you provide the password.
How to set it in your Article
Password Protected article means that even though the part of article is published, you have to give a specific password to view or unlock the contents of that page. Afterwards, you can share the password with your newsletter subscribers if you want. So they can log in every day to see premium content.
Simply follow the instructions below to create a password-protected specific content.
Below is the demo of the Specific Part of content password protected. Give the Password: FreemiumTech to unlock for next step.
Step 1: First of all Login to your Blogger Dashboard.
Step 2: On Blogger Dashboard, Click Manu Bar.
Step 3: Go to the Page or Post or place which you want to add specific part of content Password Protect.
Step 4: Then If you are doing this in Page/Post then don't forget to change Compose view to the HTML View <>
Step 5: Now paste the following JavaScript code to that empty place.
<script> function verify() { if (document.getElementById('password').value === 'FreemiumTech') { document.getElementById('HIDDENDIV').classList.remove("hiddenfreemiumtech"); document.getElementById('credentials').classList.add("hiddenfreemiumtech"); } else { alert('Password Wrong!'); password.setSelectionRange(0, password.value.length); } return false; } </script> <style> .hiddenfreemiumtech {display: none;} .freemiumtechpassword{padding:20px;background:#d1000e;border-radius:5px;width:300px;} .freemiumtechbutton{padding:4px 20px 4px; 20px;background:#222;color:#fff;width:80%;border-radius:5px;} .freemiumtechinput{padding:4px;background:#fff;color:#000;width:80%;text-align:center;border-radius:5px;margin-bottom:3px;} .freemiumtechket{text-align:center;margin-bottom:5px;} </style> <center> <div id="credentials"> <div class="freemiumtechpassword"> <div class="freemiumtechket"> Enter Password To Open This Article! </div> <input class="freemiumtechinput" id="password" onkeydown="if (event.keyCode == 13) verify()" type="text" /> <br /> <input class="freemiumtechbutton" id="button" onclick="verify()" type="button" value="Open Article" /> </div> </div> </center> <div class="hiddenfreemiumtech" id="HIDDENDIV"> <!--Start Article Body--> <p style="text-align: center;"><span style="color: red;"> YOUR_CONTENT_HERE </span></p> <!--End Article Body--> </div>
Step 6: Then Save it and Publish.
Customization
Keep your content YOUR_CONTENT_HERE place and replace your password FreemiumTech to as you want to set.
CONCLUSION
In this article, I shared with you How to Set Password in Specific Part of the content? I hope you have liked It. Please do share it with your friends and follow our blog for more.
Join our Telegram Channel to get the lastest posts updates daily.
Our All Posts Are Protected By DMCA. So Don't Try To Copy Our Posts And Reproduction In Any Way Is Strictly Prohibited! Or else Legal Actions Will Be Taken.
©Copyright: FreemiumTech™