Ad-Free Members

Ad-free for members, ads for everyone else

How ad suppression works with Raptive and Mediavine, exactly who it applies to, and what it does to your ad revenue.

Overview

Ad-free reading is a membership benefit you turn on in the Program tab of Memberships in the Publisher Portal. Because it changes what your ad network does on your pages, here is exactly what Allspice does.

When a signed-in member has the ad-free benefit, the Allspice plugin sets the switches Raptive and Mediavine already provide, on the server, before the page renders. It does not block, hide, or intercept ad requests itself.

How it works

The plugin checks the member's session in PHP, so it knows whether the reader is an ad-free member before the page is built. The ad settings are in the initial HTML, not added by JavaScript after ads have started loading.

NetworkWhat Allspice sets
Raptive / AdThriveThe adthrive-disable-all body class, which turns off display ads, and adthrive-disable-video, which turns off Raptive's automatically inserted video players (the in-post playlist and the sticky corner player). Videos you embedded yourself are content and stay.
MediavineA #mediavine-settings element that blocklists every display slot: leaderboard, sidebar, in-content, adhesion, recipe, sticky, interstitial, and the Chicory and Zergnet units.

These are controls the networks provide and read themselves. Allspice does not modify their scripts or requests.

The plugin also adds two classes of its own to the body, allspice-paid-member and allspice-ad-free-member, which you can use as styling hooks in your theme.

Both are always emitted

There is no ad network detection. The Raptive classes and the Mediavine element are both output on every ad-free member page view. The Raptive classes do nothing on a Mediavine site and the Mediavine element does nothing on a Raptive site, so emitting both avoids detecting the wrong network.

Other ad setups, such as your own Google Ad Manager tags, are not switched off. That is why the benefit's default description reads "Ads hidden on supported placements." If you know your setup, you can edit that description on the Program tab.

Who gets an ad-free page

Ads are suppressed only for a valid member session that includes the ad-free benefit. These readers all get your normal page with ads:

  • Anonymous readers
  • Signed-in readers who are not members
  • Members of a membership that doesn't include ad-free reading
  • Anyone with an expired or invalid session cookie

For these readers nothing is output: no body classes and no settings element.

TIP:

Ad-free is a benefit you choose, not something every membership gets. For a membership that unlocks content but keeps ads, leave Ad-free reading off.

What this means for your ad revenue

With ad-free reading, you give up ad impressions from members in exchange for their subscription. Work out the numbers before you set a price:

  • Your most loyal readers tend to be both your most valuable ad audience and the most likely to buy a membership.
  • Members visit often, so they usually account for more sessions per month than an average reader.
  • Use your ad network's revenue per thousand sessions to estimate what a member's visits earn in ads now, and compare that with your membership price.

Your ad network agreement

adthrive-disable-all and adthrive-disable-video are Raptive's own site-level switches, and the #mediavine-settings element is Mediavine's own mechanism. Allspice doesn't block their scripts, change their requests, or touch their reporting.

If your ad-free membership grows large, let your ad partner know. Your traffic mix is changing, and they may have advice on which slots to suppress.

Advanced controls

Two WordPress filters are available. You don't need either for normal use.

Per-network kill switch

To stop Allspice changing one network's ads, for example during a migration or while debugging with your ad partner, turn it off without removing the membership benefit:

add_filter('allspice_ad_free_networks', function ($n) {
  $n['mediavine'] = false;  // leave Raptive handling on
  return $n;
});

Both networks are on by default. Treat this as an emergency switch, not a setup step.

Mediavine video player

Mediavine's universal video player is not blocklisted by default. The allspice_mediavine_blocklist_universal_player filter adds it. Turn it on only after confirming with Mediavine that you want member video ads suppressed too.

Troubleshooting

A member still sees ads

  • Confirm the membership includes Ad-free reading
  • Confirm they are signed in on the domain in question
  • Check the page source for allspice-ad-free-member in the body classes. If it's missing, the session wasn't recognized. If it's there, the switch was set and the remaining ads come from your ad network or from a placement Allspice doesn't control.
  • Page caching is the most common cause: a cached anonymous page served to a member has no ad-free markup. See Memberships & Page Caching.

Non-members are seeing an ad-free site

Nothing is output without a valid ad-free session, so check whether something else is hiding ads: a theme option, another plugin, or an ad blocker in your own browser. If none of those explains it, contact support.

My ad network is asking what is going on

Send them this page. For validated ad-free members only, Allspice sets adthrive-disable-all and adthrive-disable-video for Raptive and per-slot blocklist attributes for Mediavine, server-side.