Support » Plugin: amr shortcode any widget » Bug found when using it for Adsense

  • Resolved Kristian Yngve


    Hi there, @anmari,

    I use this plugin to display my Google Adsense code and it works well.

    However, recently, I’ve started to see how the code is being leaked out of the amr shortcode any widget and appearing everywhere on posts and user accounts), along with pop ups.

    If I disable this plugin or delete it out of the do any widget text boxes, it goes.

    The thing is, if I don’t and have it in the inactive area of the widgets… it still happens!

    I also understand this plugin hasn’t been tested with the latest version of WordPress – any help here please.

    Looking forward to your kind reply


Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author anmari


    plugin is incredibly simple. It basically just catches the output of the widget and returns that output instead.

    Widgets output stuff directly when called whereas Shortcodes return stuff for use by whatever is calling them.

    I’m bemused that you’d want to use it as you appear to be – surely you could just put the adsense code directly in the post rather than via a shortcode that calls a widget ?

    I don’t debug the plugin wrt to each and every widget that others use it with, there are 1000’s and they may be doing weird things and not expecting to be called outside of a sidebar. I test with the standard wordpress widgets, and it’w working for those.

    Hi Anmari, thanks for getting back to me.

    Yes, your plugin is absolutely amazing, and I proudly use it for a fair few years now 🙂

    Sadly, I cannot just add the Adsense code in a specific place in each page as there are so many, and if the code changes (or styling such as the words ADVERTISMENT above the code) – it would mean editing over 100+ pages.

    I usually overcome this by adding some HTML a <hr/> line, then classing it all along with the Asense code in a text widget and use your widget plugin – so all Ads (how I have them arranged specifically), render by the shortcode: [do_widget id=text-16 class=advert-header]

    It was so easy to amend them all within the text widget, and I was successfully doing it for years.

    Now all of a sudden I have a problem,

    The Ads are appearing across many unasked for places like in front of user Profile, and on top of post content: here’s an example:

    the moment I deactivate the plugin, the issue is gone.

    The issue won’t even go if I place the said text widgets into the inactive area (within the widgets dash-panel screen).

    I have to actively delete the Adsense code out of the text widgets to sop it if I keep the plugin activated for all other of its uses.

    The thing is, it may be Google Adsense itself?

    I am getting a message from the account saying: “Earnings at risk – You need to fix some ads.txt file issues to avoid severe impact to your revenue.”

    So I downloaded it and added it to my root, and waiting out a week to see if it is their side.

    I’m still investigating, but contacting the plugin owner was an avenue I wanted to explore since you may be able to help me after understanding the issue.

    anything at all such as advice can really help me.

    looking forward to hearing back,

    Many thanks, @anmari

    Okay, I can now confirm it’s not the plugin.

    I ran a test with a text widget without using this plugin, and the same bug happens.

    I’ll hire a developer

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Bug found when using it for Adsense’ is closed to new replies.