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

Where do I add code to wordpress to content lock all posts?

Discussion in 'General Programming Chat' started by macaveli92, Jan 16, 2013.

  1. macaveli92

    macaveli92 Jr. VIP Jr. VIP Premium Member

    Joined:
    May 20, 2012
    Messages:
    142
    Likes Received:
    34
    Is it even possible to content lock all posts in wordpress by adding the code somewhere in the editor? I know it sounds lazy but I am hoping it is just smart and easy to do, please help!
     
    • Thanks Thanks x 1
  2. macaveli92

    macaveli92 Jr. VIP Jr. VIP Premium Member

    Joined:
    May 20, 2012
    Messages:
    142
    Likes Received:
    34
    • Thanks Thanks x 2
  3. hootsparta

    hootsparta Jr. VIP Jr. VIP Premium Member

    Joined:
    Aug 23, 2012
    Messages:
    1,404
    Likes Received:
    328
    Occupation:
    Unique and Spun Blogpost, Real Guest Posting.
    Location:
    Sparta World to BHW
    Home Page:
  4. raatra

    raatra Newbie

    Joined:
    Jan 7, 2013
    Messages:
    12
    Likes Received:
    1
    it is possible as there are third party plugins for locking the content of post in WordPress.
     
  5. cBeast

    cBeast Newbie

    Joined:
    May 25, 2012
    Messages:
    26
    Likes Received:
    6
    Location:
    EU
    Home Page:
    Personally I'm pasting the code in the template's header or in the footer. Never faced problems till now.
     
  6. verma005

    verma005 Newbie

    Joined:
    Jan 9, 2013
    Messages:
    7
    Likes Received:
    0
    nice that you have found the required plugin and shared it with everybody.
     
  7. Jmz

    Jmz Newbie

    Joined:
    Dec 8, 2006
    Messages:
    8
    Likes Received:
    2
    If you didn't want to use a plugin, the template file that is used will depend on your theme. The majority of the time it will be single.php. If that doesn't work this WP codex page explains the order that WordPress checks.

    Sorry, I can't post links but hopefully you'll be able to find the page by searching for Wordpress Template_Hierarchy
     
  8. terebi

    terebi Jr. VIP Jr. VIP Premium Member

    Joined:
    Apr 11, 2011
    Messages:
    337
    Likes Received:
    62
    Rather than modify a theme or hack PHP. A good content locker plugin is the better way to go.

    Unfortunately I think all the really good content lockers are non wp plugins. Like content lock pro.

    Most times though you just add a little bit of javascript to a page to enable the locker.