Forums

Plug-In Idea : Mass Inclusion of AdSense in All Posts (4 posts)

  1. lorenbaker
    Member
    Posted 3 years ago #

    Hello,

    I have over 3,000 posts in my blog and would like to include AdSense in the <i>body</i> of my posts between the 2nd and 3rd paragraphs.

    There are some <!-More-> inclusion plug-ins which include the MORE comment between 1st & second paragraphs.

    I would like to do something similar, adding a mass comment which would serve my Google AdSense ad (or any defined ad) between set paragraphs on ALL of the posts on my blog, so this would not have to be done manually.

    Anything like this on the market?

    Thanks, Loren

  2. clarke1866
    Member
    Posted 3 years ago #

    IF all your posts have the more tag, you could in theory do the following:

    + install adsense deluxe and configure the --adsense-- tag
    + Do a find and replace on the DB for all your posts to find --more-- and replace it with --more-- --adsense--

    All that said, you'd probably be further ahead to figure out what your most popular / applicable posts are and put adsense on those. I have no idea how to actually do the find and replace bit, but I'm sure you can.

    *Note: appropriate angle brackets removed from this post

  3. tinytim
    Member
    Posted 3 years ago #

    what about just editing the template

  4. davidchait
    Member
    Posted 3 years ago #

    I started this at one point, as CHAITGEAR was inserting banner ads in the body of the post on the fly -- but through hardcoded hacks in the core of the body processing.

    I haven't been back to it in a while, haven't needed it yet. If there was enough interesting (and maybe donations! ;)), it's really just an offshoot of other plugins I've already created (bits of cg-inbetween and cg-inline). Anyone who write plugins could throw something together pretty quickly, it's more a question of how fast/efficient it is.

    Note, you DEFINITELY want to be running something like WP-Cache2 with any plugins that modify the post-content, so that the results are cached and not run constantly...

    -d

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags