• Resolved supertrooper2

    (@supertrooper2)


    Hello there

    The plugin works well and the ads appear within the post after the second paragraph.

    Ideally I would like the ad to be at the beginning of the post before the first paragraph and with the text then wrapping around the ad.

    How can this be achieved?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support mbrsolution

    (@mbrsolution)

    Hi, thank you for your question/ request. You could add the shortcode in a widget if your theme allows that. The widget would be located on the top of the page or post. If that does not work for you, you could use the php code and add it to one of your theme files.

    Let me know if you need more information or help.

    Thank you

    Thread Starter supertrooper2

    (@supertrooper2)

    Another option might be to change the plugin coding:

    Where in the coding is “after the second paragraph” specified?

    Perhaps this could be changed to after the first paragraph or before the first paragraph.

    Please advise.

    Thread Starter supertrooper2

    (@supertrooper2)

    In the meantime I experimented with the file WP-Simple-Adsense-Insertion.php and change part of the code to:

    //Insert after N paragraphs.
            $insertAfter = 1;

    This change placed the Adsense Ad after the 1st paragraph instead of the 2nd one. Logically one would expect that changing to $insertAfter = 0; would place the Adsense Ad before the 1st paragraph but this doesn’t work!

    Is there a code change which will resolve this issue?

    Thread Starter supertrooper2

    (@supertrooper2)

    In the meantime we were able to resolve the issue by inserting the shortcode directly into the child theme file.

    Thanks for your great support.

    Plugin Support mbrsolution

    (@mbrsolution)

    Hi, I am glad to see that you found a solution to your problem. Perhaps you might like to share what code you added to the child theme. This would help others running into the same issue as yourself.

    I have also submitted a message to the developers to investigate further your request.

    Thank you

    Thread Starter supertrooper2

    (@supertrooper2)

    It doesn’t matter whether the code is the “raw” Google Adsense code or a shortcode generated by your plugin. Both will work.

    The key thing is to identify the position in the single.php or content.single.php file where the code should be inserted.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Insert Ad Before First Paragraph’ is closed to new replies.