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

CPAgrip, wordpress, and content locking

Discussion in 'Blogging' started by uncommon, Feb 16, 2014.

  1. uncommon

    uncommon Newbie

    Joined:
    Dec 23, 2013
    Messages:
    31
    Likes Received:
    2
    So I'm stuck with integrating this code into my wp theme. I have a one page landing page theme. I want to use the content locker feature of CPAgrip to lock specific buttons.

    They gave me some code that I'm unfamiliar with. I believe I've put the javascript they provided in the proper location in the header.php file. However, there is a second part of the code that I'm unsure with.

    The code is:

    onclick="call_locker();"

    I'm not sure but I think I need to wrap the code I want locked. Is that the case? If so, then I need to wrap the buttons I want locked?

    However, I'm not sure how to go about finding the write code to wrap or even if I'm on the write path. Any suggestions? I'm not a coder. Google is my best friend when it comes to this side of wp. I'm getting better but taking time.
     
  2. mrcheese

    mrcheese Newbie

    Joined:
    Sep 8, 2009
    Messages:
    25
    Likes Received:
    22
    Onclick is a JavaScript function so you would attach it to the button id you want protectified. So say to have <input id="yourmom" > or <div id="yourmom">, you would attach that on click function to #yourmom. Its hard to tell without the actual snippet but that's the idea.

    Edit: forgot to mention your button will be inside of the div or it will be the input tag.
     
  3. moviespire

    moviespire Newbie

    Joined:
    Apr 14, 2014
    Messages:
    11
    Likes Received:
    0
    How is the code going to be inserted?
     
  4. amirov137

    amirov137 Registered Member

    Joined:
    Feb 26, 2014
    Messages:
    62
    Likes Received:
    0
    someone got any answers of this ?? i'm trying to lock image linked to download site but the offers popups and directed locked site in the same time
     
  5. allroy

    allroy Registered Member

    Joined:
    Aug 4, 2013
    Messages:
    67
    Likes Received:
    18
    Basic example:
    Code:
    <button onclick="call_locker()">Click me</button>
    You insert the code they gave you inside the clickable element's tag.
     
    Last edited: Jul 29, 2014