Although some see sharing as one of the core principles of the Internet, there are times where we only want to share some information with a certain group of people.
This information, let’s call it “premium content” for all intents and purposes, will only be shared with users who give us something in return. This “something” can be an email address, a PayPal donation, or simply a share on Facebook.
In this tutorial, I will explain how to create a content locker plugin that with a simple shortcode will let us choose what content we want to make premium.
We will cover two examples:
Once example will be a simple shortcode that will allow us to display content to users who are registered on the site.
The other shortcode will require that the user must share the content's URL on Facebook in order to read the rest of the content.
In WordPress Social Invitations we use a very similar content locker that shows content only to users that invited their friends.
Note: Instead of adding code to a theme’s functions file and/or stylesheeet, I recommend creating a plugin to add it to your site. This method keeps everything in one place and let you use the shortcode on any other site.
__________________
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. / To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. / To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. / To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|