Making the Ad post type public
How to make the Advanced Ads ad post type public to reach them under dedicated URLs.
Read moreHow to make the Advanced Ads ad post type public to reach them under dedicated URLs.
Read moreHow to perform custom actions when an ad changes its status.
Read moreHow to enable the WordPress REST API for ads.
Read moreHow to trigger the reload of ads in the frontend.
Read moreHow to disable the Ad Settings meta box using some custom code.
Read moreHow to show an alternative ad if AdSense or Google Ad Manager ads stay blank?
Read moreAdvanced examples for ad server embed codes for our Wordpress ad server module.
Read moreExplains how to use the advanced-ads-content-injection-nodes-without-ads filter to exclude certain elements from ad injection.
Read moreCode examples on how to move the output of the Custom Code option above the ad or how to manipulate it on the fly.
Read moreBy default, Advanced Ads sets the available ad weight for ads in groups to 10. This number increases if the amount of ads in the group is higher. You can also add your own ad weight maximum using the code below. /** * Increase available ad weight in group settings * uses 100 if regular […]
Read moreBy default, Advanced Ads comes with “Ad Groups” as the only taxonomy. If you need further options to group ads then you can build that using the code below as a basis. I built that as a custom job for a client to allow grouping ads by a “company” taxonomy. Since it is a bit […]
Read moreSome users might want to change the div container Advanced Ads uses for ad placeholders in Advanced Ads Pro cache-busting or when some output options like a margin are selected. The code below changes the div into an article container. Please notice that this could break some other part in Advanced Ads, especially JavaScript-based ad placements. […]
Read moreYou can add your own placement to Advanced Ads. The example below does that for a specific action hook. You can adjust it according to your own purpose. Just change the ADVADS_CUSTOM_HOOK_PLACEMENT_HOOK_NAME to any action hook you want to show the ads in. The whole code from below can go into a new PHP file which […]
Read moreIf you are using our advanced JavaScript functions to retrieve or store cookies on a website that loads the jQuery library in the footer, you might be interested in the following code snippets. The first part is an example of how to show the number of page impressions from the appropriate cookie. The second snippet shows […]
Read moreAdvanced Ads automatically removes custom meta boxes on the ad edit screen. This is needed, because sometimes, plugin authors forgot to specify that their meta box is only meant for public post types, like posts and pages. Users then might have seen an SEO-related box on the ad pages, which neither worked nor made sense. […]
Read moreThe following code allows you to block specific user agents or referrers from being tracked with the Tracking add-on. It was written for a very specific use case in mind but can still serve you as a basis to implement your own, custom filter.
Read moreThe following JavaScript code allows you to do something as soon as Advanced Ads Pro finished loading ads. if ( typeof advanced_ads_pro === 'object' ) { advanced_ads_pro.observers.add(function(event) { // Note: These events may be triggered multiple times // because not all ads are injected at the same time. // The injection may be delayed by […]
Read moreAdvanced Ads Pro comes with passive Cache Busting, a performance-optimized method to deliver ads on cached websites. It basically performs the checks needed to choose the correct ad for a visitor using JavaScript. This includes most Visitor Conditions. While it is rather simple to extend Visitor Conditions with PHP based checks by just looking at […]
Read more