Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author benohead

    (@benohead)

    I think this should be feasible. I’ll probably have to use a similar logic as for paragraphs.

    The only problem with dots is that they mark the end of a sentence, not the beginning. So if your last sentence ends with a dot and you want to put the ad before the last sentence, you’ll need to add it after the second to last dot. But if the dot after the last sentence is missing, then this would place the ad before the second to last sentence.

    Maybe stripping HTML tags to get the content and checking whether it ends with a dot is then required in order to really find out the spot before the last sentence.

    Let me give it a try in the next version. I’ll post a new message when it’s available.

    Plugin Author benohead

    (@benohead)

    Please have a look at version 0.9.4. It provides 2 new placement options “before last post sentence” and “before last page sentence”. It identifies sentences by search for dots so it will not be 100% reliable (e.g. when sentences contain numbers with dots or when you end a sentence with 3 dots).

    Feedback is welcome.

    Note that you could also use the “before last post/page paragraph” placements and make sure that the last sentence is always in an own paragraph.

    Thread Starter kacper3355

    (@kacper3355)

    Hello. In my case when i tried to apply ads via the new options, my site got destroyed. Margins, images, sidebars, footer – everything. So i think it’s not working. ??

    Plugin Author benohead

    (@benohead)

    Unfortunately, it looks like this feature caused problems for many users (especially since there was also a problem with the default value for not set placements).

    One problem here is that sometimes when I search for sentences using dots, I do land in the middle of a tag (e.g. div with inline css). In this case it breaks the whole page. So in version 0.9.5, I’ve removed this feature. I’ll give it some more thoughts and see whether I can come up with a better solution. Until then, the best solution would be to put the last sentence in an own paragraph and use the “last post/page paragraph” placements.

    anefarious1

    (@anefarious1)

    Benohead an awesome feature would be the ability to place ads after any number of paragraphs. As of now, you can only insert an ad after the first paragraph. Also, it should be that you can place AD UNIT #1 after for example 3rd paragraph and also place AD UNIT #2 after 6th paragraph. I hope you will implement this because it would make your plugin super awesome. Thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Ads before last sentence’ is closed to new replies.