Skip to content

Instantly share code, notes, and snippets.

@sjaved87
Created May 27, 2016 14:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sjaved87/726cbd3be22357308feb779dd1b95031 to your computer and use it in GitHub Desktop.
Save sjaved87/726cbd3be22357308feb779dd1b95031 to your computer and use it in GitHub Desktop.
[Admin Ads] This will restrict admin ads to show on dashbaord page of network only.
<?php
add_action('admin_init', 'remove_admin_ads_from_other_pages');
function remove_admin_ads_from_other_pages(){
global $pagenow;
if($pagenow != 'index.php')
remove_action('admin_notices', 'admin_ads_output');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment