WordPress.org

Ready to get started?Download WordPress

Forums

Removing adsense from posts (11 posts)

  1. eagerwatcher
    Member
    Posted 1 year ago #

    I want to remove adsense from around 500 posts and am then going to use a plug-in (pro-version) to allow me to place ads where and I want them and also mix adsense with Chitika ads.

    http://misconceptions.us

    I'm rather fed up with Adsense because they seem to be grossly under-reporting, and I've have had fairly decent results from Chitika after just a week.

    At least I get replies from humans at Chitika ;-)

    Anyway I tried doing it through phpMyAdmin but it wouldn't work due to line formatting.

    Or let's say that I couldn't get it to work anyway.

    So my plan was to download the posts table and to modify it via Notepad ++ search and replace.

    But I quickly discovered that I don't know how to set the search parameters in Notepad ++ :-(

    The ad_slots will obviously vary, so how do I search and replace for everything that includes and contains.

    XXXX was only removed so as not to show my whole pub #

    <center><script type="text/javascript"><!--
    google_ad_client = "pub-913798780086XXXX";
    /* misconceptions

    //-->
    </script>
    <script type="text/javascript"
    src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
    </script>
    </center>

    Some will have <center> and </center> and some won't.

    Thanks very much,

    Michael

  2. Andrew
    Forum Moderator
    Posted 1 year ago #

    Which theme are you using and where was it brought from?

  3. eagerwatcher
    Member
    Posted 1 year ago #

    Andrew Nevins wrote:

    Which theme are you using?

    Wow that was fast!

    Thanks!

    http://wordpressthemesbase.com/detail/983.html

    sports2

  4. Andrew
    Forum Moderator
    Posted 1 year ago #

    So the ads are within each post, not within a template .php file elsewhere?

  5. eagerwatcher
    Member
    Posted 1 year ago #

    Written within each post :-(

  6. Andrew
    Forum Moderator
    Posted 1 year ago #

    Did a plugin generate these in-post adverts? If so, can you deactivate that plugin?

  7. PSA: Can I encourage you to use a different theme? That site's domain name is violating the WordPress trademark and that just not cool.

    http://wordpressfoundation.org/trademark-policy/

    I can't download that theme but the site alone is dodgy sounding.

    Try one of these themes instead.

    http://wordpress.org/extend/themes/

    /end PSA

    I want to remove adsense from around 500 posts

    How did you add the code to those 500 posts? By hand or using another plugin?

  8. eagerwatcher
    Member
    Posted 1 year ago #

    @Andrew Nevins

    Thanks

    I wish they had been generated by a plug-in.

    If they had been then gone in a couple of clicks.

    Which is why I want to delete them and had a plug-in insert them.

    It's possible via search and replace because a friend of mine did it on one of my other sites - http://survivor-story.com/

    But I don't want to lean on him again.

    Better for me and others to learn ;-)

  9. eagerwatcher
    Member
    Posted 1 year ago #

    @Jan Dembowski

    by hand.

    But how will another theme help me delete adsence?

  10. It won't, my theme comment was a gratuitous off topic Public Service Announcement. ;)

    So my plan was to download the posts table and to modify it via Notepad ++ search and replace.

    Notepad++ can do the job by highlighting the found text and then pressing CTRL-H. Then go to the Replace with: field and put in the text you want.

    Uploading that table... please make sure you have a complete database backup before you make those changes.

  11. eagerwatcher
    Member
    Posted 1 year ago #

    Thanks Jan,

    but I just had a quick play around with this and it doesn't seem quite as simple as that.

    Some code <n> and </n> for example gets left behind and the middle of the google script has different slot numbers and sizes.

    So I think wild cards or something similar will be needed.

    Where my code has line breaks might also make a difference?

    [ Moderator note: Code wrapped in backticks, easier to read that way. ]

    <center><script type="text/javascript"><!--
    google_ad_client = "pub-913798780086xxxx";
    /* misconceptions - 468x60, created 2/6/10 */
    google_ad_slot = "3109690639";
    google_ad_width = 468;
    google_ad_height = 60;
    //-->
    </script>
    <script type="text/javascript"
    src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
    </script>
    </center>

    Michael

Topic Closed

This topic has been closed to new replies.

About this Topic