Changing content locker on all pages?

Discussion in 'Web Design' started by Metamo, May 9, 2013.

  1. Metamo

    Metamo Newbie

    Joined:
    Jul 26, 2011
    Messages:
    34
    Likes Received:
    4
    Occupation:
    Student
    Location:
    Hungary
    So I'd like to test some other content lockers/networks on my wordpress site, but I don't want to manually change the code on a hundred page every time.
    How could I do this? I was thinking that maybe some wordpress plugin exists that can change the same line in every page, but I haven't found anything yet.
     
  2. TheMoneyWizard

    TheMoneyWizard Elite Member

    Joined:
    May 31, 2012
    Messages:
    2,350
    Likes Received:
    2,468
    Location:
    Wonderland
    Not sure what you are asking? Have you tried; "Easy WordPress Content Locker"?
     
  3. Metamo

    Metamo Newbie

    Joined:
    Jul 26, 2011
    Messages:
    34
    Likes Received:
    4
    Occupation:
    Student
    Location:
    Hungary
    Ok, I'm using the content locker from adscendmedia. And it's code is on every page because I call it with onclick. Now I'd like switch to adworkmedia's content locker, but to do this I have to go to every page(more than hundred) and change onclick="javascript:initGateway(); return false; to onclick="javascript:gLoad(); return false; because of the different function name.
    So I'm searching for a tool/way to do this without manually going through all the pages. I hope it's more understandable this way.
     
  4. TheMoneyWizard

    TheMoneyWizard Elite Member

    Joined:
    May 31, 2012
    Messages:
    2,350
    Likes Received:
    2,468
    Location:
    Wonderland
    Yeah I understand you now, but I am really not sure of any tools capable of doing this, sorry :(
     
  5. innozemec

    innozemec Jr. VIP Jr. VIP

    Joined:
    Aug 19, 2011
    Messages:
    5,368
    Likes Received:
    1,807
    Location:
    www.Indexification.com
    Home Page:
    there's no easy way to do that.. if you know bit of php you can do something like this:

    mysql query: SELECT id,post_content from wp_posts
    while(go through all posts from the db)
    {
    replace what's needed in post_content;
    mysql query: update wp_posts set post_content=REPLACED_CONTENT where id=ID;
    }

    if you take that route, do not forget to backup your WP database before that!
     
    Last edited: May 9, 2013
  6. AAWebDev

    AAWebDev Jr. VIP Jr. VIP

    Joined:
    May 20, 2012
    Messages:
    744
    Likes Received:
    76
    Gender:
    Male
    Occupation:
    Business Development Executive
    Location:
    Dexel Island
    i searched for such script too, but didnt find any automated system, let me know if you are lucky :)