Easy Plugin for AdSense
[resolved] [Plugin: Easy AdSense] Mid-Post Ad template bug fix with Pro? (6 posts)

  1. bigballer
    Posted 4 years ago #

    Hello, my mid-post ad shows at the top of the content, just under the top ad. I believe my template to be the cause, as it breaks other ad plugins mid-post placements also. Could purchasing the Pro version solve this?


  2. manojtd
    Posted 4 years ago #

    I don't think the Pro version will fix it. If you post your blog URL, I can take a look and try to figure out what is causing it.

  3. bigballer
    Posted 4 years ago #


    is an example of a page affected. I have placed a link unit in the mid-post section to give you an example.

    Thanks! if you can figure it out I will certainly upgrade to pro regardless, and donate a little extra.

  4. manojtd
    Posted 4 years ago #

    I looked at your page, and I think I know what's going on.

    My plugin counts the paragraph markers (<p> tags) to determine an appropriate place to insert the mid-text ad, which would be between two paragraphs near the middle of the post. On your post though, it looks like the <p> tags are being stripped off either by your theme or a plugin, and reinserted before generating the final output. So my plugin doesn't see any paragraphs, and concludes that half the total number of paragraphs is zero, which is near the top.

    The only option I can think of is to insert the mid-text ad based on the number of words or characters. But I think it will look ugly, because it might break a line or a word to put the ad in between.

  5. dorf
    Posted 3 years ago #

    A slightly better, but still imperfect solution, is to look for return lines.

    Thus I modified easy-adsense-lite.php line 492

    if(strpos($content, "<p") === false)
    $repchar = "<br;


    if(strpos($content, "<p") === false)
    $repchar = "\r\n";

  6. dorf
    Posted 3 years ago #

    if(strpos($content, "<p") === false)
    $repchar = "<br";

    I missed the quote after the <br

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Easy Plugin for AdSense
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.