- Install the WPCode plugin.

2. Go to 'Code Snippets'.

3. Click 'Add New'.

4. Click 'Add Your Custom Code (New Snippet)'.

5. Click 'PHP Snippet'.

6. Add the following code to disable ads for all logged in users:
function disable_ads_meta_tag_for_logged_in_users() {
// Only add the meta tag if the user is logged in
if (is_user_logged_in()) {
echo '<meta name="disable_ads" content="1">' . "\n";
}
}
add_action('wp_head', 'disable_ads_meta_tag_for_logged_in_users', 1);

Note: If you want to only disable ads for admins and not those with the role 'subscriber' then use this alternate code instead:
function disable_ads_meta_tag_for_contributors_and_above() {
// Only add the meta tag if the user is logged in AND has contributor level or above
if (is_user_logged_in() && current_user_can('edit_posts')) {
echo '<meta name="disable_ads" content="1">' . "\n";
}
}
add_action('wp_head', 'disable_ads_meta_tag_for_contributors_and_above', 1);
7. Click 'Update'.

8. The final step is to create a rule to disable ads when Ezoic detects the meta tag you've just added to your wp-admin pages. You can do this via https://pubdash.ezoic.com/ezoicads/adrestrictions. Under 'Page Rules', click 'New Restriction'.

9. Select 'Meta Tag' from the drop-down menu, then enter 'disable ads' next to 'Meta Tag Name' and '1' next to 'Content'. Finally, click 'Create Rule'.

That's it - you're done!