Walls and access
Whether a reader sees a wall is decided in three steps. Each can veto the one before it, so it is worth knowing the order.
- Is this post gated at all? Set by the restriction mode.
- How hard? Set by the access level.
- Does this reader get past anyway? Set by what they have bought, plus bypass rules.
1. What gets gated
On the Monetization tab:
- Only posts with a Paywall block — a post is gated only where you have placed the block. Nothing else changes, which makes this the safest starting point.
- All posts of selected types — every post of the chosen types is gated.
- Posts in selected taxonomies — anything carrying a term in the taxonomies you pick.
To gate by something none of these express — one category, a private term, a custom field — use fabrica_monetization_kit_should_restrict_content. The post must still be of a restricted post type.
2. How hard it is gated
Four access levels: open, registration, metered, paid. See the overview for what each does. open is settable on a post or a term only — the site default offers just registration, metered and paid.
A post’s level is resolved in this order:
- The level set on the post itself.
- The level on any of its terms, in taxonomies you have marked sellable or used to scope restriction. A term in any other taxonomy cannot carry a level, because the field is not registered there.
- The site default.
Where terms disagree, the strictest wins, ranked open < registration < metered < paid, so adding terms can only raise the gate. If you need one taxonomy to have the final say instead — an issue overriding a section, say — order your taxonomies under Monetization → Taxonomy access-level precedence. The first one carrying a level decides. fabrica_monetization_kit_access_level_taxonomies overrides that setting from code.
A precedence order can lower a gate as well as raise it. Once one is set, the first listed taxonomy carrying any level wins outright, so an open term there overrides a paid term further down. Strictest-wins holds only while no precedence order is configured.
open always wins over everything, including a filter that tries to force a wall: it is enforced last, after the filter runs, so a filter cannot wall a post whose level says it should never be walled. To force-gate such a post, raise its level as well.
This keys on the level alone, not on whether anything is actually for sale. A paid post with nothing configured to sell still shows a wall, carrying a notice that payments are unavailable.
3. Who gets past
A reader sees the full post if any of these is true:
- They can edit posts. That is the
edit_postscapability, so Contributors and Authors are waved past as well as editors and admins — which is why you must test logged out. A site that gives ordinary readers a contributor-ish role opens everything to them. - They bought this post, one of its terms, or one of its authors.
- They have a subscription that covers it.
- The request matches a pattern in User-agent bypass patterns, on the Advanced tab. That list is empty by default, so nothing is bypassed until you add to it — this is where sites let search-engine crawlers index gated content.
- A filter says so —
fabrica_monetization_kit_user_has_access, orfabrica_monetization_kit_bypass_restriction.
What a subscription covers
Three models. Two are radios on the Monetization tab, under Access dates for subscriptions, and they appear only once you have picked at least one subscription product and your default level is metered or paid.
- Universal — “Grant access to all content regardless of publication date”. The default, and what most sites want. It unlocks everything for a subscription to any product on your Site-wide subscriptions list; once that list is non-empty, a subscription to a product outside it unlocks nothing.
- Date-based — “Only grant access to content published during the active subscription period”. Right for a site with issues or editions, where back numbers are sold separately. A configurable look-back lets a new subscriber read recent issues.
- Tiered — each subscription product unlocks particular taxonomy terms. Code only: return a map from
fabrica_monetization_kit_subscription_category_map. Doing so hides the radios, because the code is then the authority.
Someone who cancels keeps what they paid for under every model, not just the date-based one: a lapsed subscriber still reads content published during the window they paid for.
The free preview
Above any wall — paywall or registration wall — readers get a preview: the opening of the post.
- How much — where you placed a Paywall block, the preview runs to that block and no count applies. Everywhere else it is capped at four blocks. Change the cap site-wide with
fabrica_monetization_kit_preview_length, or per post in the editor. Setting the per-post length to0removes the cap rather than the preview, publishing the whole post above the wall. - What counts — paragraphs only, by default, so headings and images do not eat a reader’s free blocks. Change with
fabrica_monetization_kit_counted_blocks. - What is always shown — the first cover block, so the hero image survives. Later ones are dropped from the preview. Change with
fabrica_monetization_kit_always_show_blocks. - The finished HTML —
fabrica_monetization_kit_preview_content, for appending a teaser or fading the last paragraph.
The preview is built from the block tree, not by cutting HTML, so group and column wrappers survive intact and nothing below the wall reaches the browser. Paid content is never in the page for a logged-out reader — hiding it with CSS would not be a paywall.
That guarantee covers the post’s own page, where the plugin filters the_content. It does not extend to a theme that prints $post->post_content itself, nor to feeds, excerpts and secondary queries, which are left untouched.
Whatever you return from preview_content is seen by logged-out visitors and search engines. Do not put paid content back in.
Metered reading
metered is a “register, then read a few” model, and the free reads are the reward for signing up — not something anonymous visitors get.
- Logged out → the registration wall, straight away. No free reads.
- Logged in, quota left → the full post, and the read is counted.
- Logged in, quota spent → the paywall, with a notice explaining why.
The quota is five posts a month by default. Counting is per reader and resets monthly, and the check and the increment happen together so simultaneous page loads cannot slip an extra read through.
A reader who has bought the post, or has a subscription covering it, never touches the quota.