Ready to get started?Download WordPress


Revenue Share for Authors (RSP for WordPress)
Error on code if i set ads to center of post (6 posts)

  1. acquariusoft
    Posted 1 year ago #

    If i set the ads on the center of post i obtain this code

    <div class="entry-content">
    			<a<br /><div align=center><script type="text/javascript"><!--
    google_ad_client = "ca-ca-pub-0638797270094505";
    google_ad_width = 468;
    google_ad_height = 60;
    <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></div><br /> id="dd_start"></a>

    and i see id="dd_start">` in the code.

    with the other position is all ok.
    Can you solve this problem?



  2. obscurant1st
    Plugin Author

    Posted 1 year ago #

    Ok thanks for reporting. i will check into that and reply here shortly.

  3. acquariusoft
    Posted 1 year ago #

    i think is good if you not search the half of the post, i think you must count <p> tag and divide, or (more interesting for me) choose the number of <p> tag where insert ads.

    Tnx for you work!!

  4. obscurant1st
    Plugin Author

    Posted 1 year ago #

    Thanks! :)

    Did you try deactivating all the plugins except this one?
    I think its not the problem with this plugin as it works perfectly in my blogs!

    Please check it and let me know!

  5. acquariusoft
    Posted 1 year ago #

    i think the problem is the logic, in my blog i insert image in the start of post, with link ecc.
    if post is short and you try to find the middle of the post, it is inserted in the tag of the image. also if you only count char you can insert in the middle of tag or link.

    I think is good find the end of some paragraph and insert in it

  6. obscurant1st
    Plugin Author

    Posted 1 year ago #

    $insert_ad = strpos($content, '. ', $count_words);
    Check this in the plugin's php file and try changing it to the code below!
    $insert_ad = strpos($content, '</p> ', $count_words);

    I don't know if it will work as I haven't tried it. In most cases my logic seems to be working fine. I didn't use a <p> for inserting the ad because if someone choose to write the blog post with just one paragraph this code will have the no effect if s/he chooses bottom or middle.

    Good luck with this anyway!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic


No tags yet.