Adding content locking in WordPress

Adding content locking in WordPress



We have been trying to answer most of the questions that users get about using the WordPress and just don’t know where to get the answers from. Another common question that people have is how to add content locking. Many people want to use content locking on their sites so that they can boost the lead generation, build email list and increase sales. In this article we will explain how you can implement content locking in WordPress without affecting the users.

What exactly is content locking in WordPress and why do you need to use it?

Content locking in WordPress is basically used by the site owners to ensure that they can force the users to perform an action before they get access to the content of the site.

One point you must keep in mind is that if you do not use it properly it can annoy the users and that is not something we want right. Do not be scared of using content locking if you can do it right it could give high leads and help you achieve the marketing goals for your site.



One point to keep in mind is use the concept of content locking when you have something of value in the content. Use it for a free eBook, a free course or maybe before a free download. Use a simple logic why will the user go through so much of trouble they will do so only when they feel that the content is actually worth it. As you are clear with the concept we will now teach you how exactly you can use content locking in your site.

What are the things you need for content locking in WordPress?

In this tutorial we are going to use OptinMonster as we feel that it is the best lead generation solution that you can find in the market. If you want to use OptinMonster for content locking you will have to use the plus or the pro plan. If you are new to WordPress you can get 10% discount by using the OptinMonster coupons.

Adding Content locking in WordPress

The first step here would be to install and activate the OptinMonster plugin that you can get in WordPress. We have already explained a step by step guide on how exactly you can install a WordPress plugin in our previous article titled “How to Install a WordPress Plugin” you can go through that and install the OptinMonster plugin. This plugin is basically a connection between the WordPress site of yours and your OptinMonster account.

Now that you have installed the OptinMonster plugin we will move to the next step and that is activation of the OptinMonster plugin. Unless you activate it there is no way you can use it. Once you are done with all this you will have to click on the OptinMonster menu item that you can easily find in the WordPress admin bar. Once you do that you will be asked to provide the OptinMonster API username and the key.



You must be wondering where you will get the API information. Well you will find it under the column your account on the OptinMonster website itself. What you will have to do is just login and click on the API link.



We hope that you have got what we are trying to say so far. Now we move to the next step. In this step you will have to copy and paste the API username and key into the OptinMonster plugin page. Once you have done that you will have to click on the “connect to OptinMonster” button. If you have done so you will be successfully connected and all that you have to do is create new optin button.


Now that you have reached this step you will be directly taken to the OptinMonster website. Once you get to the website you will have to provide a title for the optin campaign and also select your website from the drop down menu. After you are done with this you will have to move to the next step and that is you will have to select the “after post/inline” whichever you want as your optin type. After you are done with this some ready to use templates will appear on the right column and you will have to choose the template that you actually want.


Now you will see that the OptinMonster’s form builder here what you can do is configure the settings and customise the appearance of the optin and the result will be exactly the way you want. You can edit the fonts, the texts, the images and even the colours. Anything that you want can be edited using this form. It will look something like what we have enclosed in the screenshot below.


So far I hope you are clear on what you need to do. Now we will move to the next step. You will have to click on the “optin” menu and then scroll down to the content blocking section at the end. You will have to click on the “content blocking” option for this optin and you can do this by clicking the on or the off switch as shown in the screenshot that we have attached below. When you turn it on it will show you the options that you can use to determine how you actually want in the content blocking system to work. For doing this the most important thing is to choose the content blocking method.


The two options that you can do to hide the content is obfuscation which will blur the content and you can also use removal of the content if you want to completely remove the content. The option is up to you to choose. These options can be found under the content below optin.


Another important thing that you need to do is change the success cookie duration to a zero. This will ensure that the cookie is prevented from being set unless the user submits the optin. Once you are done with all this you will have to go through the integration setting and connect to your own email marketing service. This will also help you to configure the analytics setting. We hope you are clear so far. After all these above steps are completed you will have to click on the save button. You will find the save button on the top hand right corner of the builder for saving the settings. This is the most important step if you do not save it then all the changes that you have done so far is actually of no use. We are enclosing a screenshot that will help you understand where you can find the save button.


So you have basically by now made all the changes to the OptinMonster account and now you will have to go to your own WordPress site and click on the OptinMonster menu. When you do that you will be able to see the content lock optin under the list of the optins. Sometimes it is possible that you will not be able to see the content lock optin do not worry just click on the refresh optin button and you will be able to see the optin.


Well now that you have done till this you can move to the next step. You will have to click on the optin title and then click “edit optin output settings” link. This will take you to another page where you will have to click on the “enable optin on site” option as shown in the screenshot that we have attached below.


Another important point that you have to keep in mind is that at the end of the page you will see a “save” button that you will have to click if you want to save the settings else all the settings that you have done so far will be lost. Next step will be to click on the OptinMonster menu again and this will take you back to the optins overview page. Here you will have to copy the optin slug. We have highlighted what the optin slug is in red colour in the screenshot that we have attached below.


After all this is done you will have to edit the post or page where you want the content locking to exactly be enabled. This optin slug that you have copied is a shortcode and it has to be added before all other contents in your post or you can also add it after the first paragraph. You will find a optin slug here and what you have to do is replace this optin slug that is already there with the new optin slug that you just copied.


With this you can move to the next step that is your post or page. You will have to visit this post or page in a new browser window and you can see the content locking in action before you make it live for the users.

Adding the content locking to all the WordPress Posts

You might want to add content locking to all your WordPress posts. This is comparatively easy than what we were explaining so far. For doing this you will need a different plugin and that is called “Insert Post Ads” plugin. After you have activated this plugin you will have to go to “post adverts” and settings for configuring the plugin settings. We have included a screenshot to explain this.


After this you will have to choose the place where you want the enable the post ads or the plugin posts or pages and then click on the save settings button. Remember that until you save the settings the changes will be lost.

After this again go to the post adverts option and add a new page. You will have to provide a title for the content locking script and then add the content lock optin shortcode in the advert code section.


After this go to the “display the advert” dropdown menu and you will have the option to either add it before the content or after the first paragraph itself and click on the publish button. This is it and the plugin is all active and you can see it working on all your WordPress posts.

We would like you give a recommendation here and that is always add the shortcode after the paragraph as this will help you to use the first paragraph to tell the users about how useful and valuable your content actually is and why they should read the rest of the content. We have tried to explain all the steps that you need to follow in order to add content locking in WordPress. We have ensured that we include images wherever possible. There are many steps involved and it is actually not very easy to do but if you do it once you will for sure get the hang of it. We have tried to keep the explanation simple and slow so that you can understand the steps better. We hope that you will find this article informative and useful.