Mecha CMS

Mecha CMS blog and documentation.

Private Post Plugin

Updated: Sunday, 07 August 2016

Limit access to your post content by providing a password protection.

Table of Content

Enter a password protection to the custom field provided in the post editor:

asdfasdf

Create custom password hint by formatting the field value like this:

<answer>: <question>

Example:

wow: What is <em>doge</em>?

Download Latest Version

Tip

Add this CSS either to your layout.css file (without the <style> tag) or by putting it directly to the custom CSS field of the post you want to protect to make the form expanded as a full screen overlay:

<style>
.overlay--private-post,
.form--private-post {
  position:fixed;
  top:0;
  right:0;
  bottom:0;
  left:0;
  z-index:9999;
}
.overlay--private-post {background-color:#222}
.form--private-post {
  top:30%;
  bottom:auto;
  color:white;
  text-align:center;
}
.form--private-post input {
  background-color:white !important;
  color:#333 !important;
  text-align:left;
}
.form--private-post button {
  background-color:#FFA !important;
  color:#333 !important;
  font-weight:bold;
}
.form--private-post input + p {font-size:150%}
</style>

The result:

Image

Donation and Email Subscription