Reload ads using JavaScript

We provide the code snippets and content on this page without any guarantee or support. In most cases, these pages are created on requests or based on individual solutions sent to us by other users. After it was published, we are only reviewing the code and content when we are made aware of an issue. Please let us know if you find one.

Please only use the codes if you understand them and know how to add custom code to your WordPress site.

You can reload ads in the frontend using a JavaScript function. This is possible for all ads delivered through the Cache Busting technology in Advanced Ads Pro.

Use the following JavaScript whenever you want to reload the ads:

jQuery( document ).triggerHandler( 'advanced-ads-resize-window' );Code language: JavaScript (javascript)

Please note:

Cache Busting is only used automatically when needed. The simplest way to force it is to give the ad or placement a visitor condition.

If you use our Tracking add-on, ad impressions are counted each time you reload the ads.

Make it better

Increase your ad management skills without spending more time.
Join over 150,000 publishers and AdOpts increasing their ad revenue.