1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

how to content lock wordpress login

Discussion in 'Site Flipping' started by goldencrownz786, Oct 10, 2011.

  1. goldencrownz786

    goldencrownz786 Regular Member

    Joined:
    Feb 6, 2011
    Messages:
    210
    Likes Received:
    21
    Location:
    toronto
    is there any way to add a content locker script to the login of a wordpress website, im offering a free service to my visitors ( mobile unlock code ) which will be sent to their inbox on wordpress, i would like to make money by locking the login form so that they fill a survey and then get access to the content.
    Is this possible?
     
  2. infTee

    infTee Junior Member

    Joined:
    Mar 2, 2010
    Messages:
    101
    Likes Received:
    97
    Location:
    Ireland
    Sure, go into your themes functions.php in the theme editor and add this code:

    Code:
    function do_the_lock() {
    	echo "Content locker code here";
    }
     
    add_action('login_head', 'do_the_lock');
    
    Just put in your locker code where it says and it should be ready to go. If you get errors it will probably be because the locker code wasn't escaped, so if your locker code has double quotes in it just put a \ in front of each double quote.
     
    • Thanks Thanks x 1