Plugins
Aeon Subscription: themes and integration
How the plugin fits any WordPress theme, with adapters, blocks, shortcodes, template overrides, page caches and SEO plugins.
Last updated 27 November 2026
The plugin works on any WordPress theme that uses the standard WordPress filters. Support comes in four levels; each needs less from the theme than the next.
| Level | What | Works on |
|---|---|---|
| Automatic | The article shell, excerpts, REST and feeds. Each post gets the class aeon-access-{mode} (open, metered, registration, locked). The account link is added to the menu. | Every theme that uses the standard filters |
| Blocks and shortcodes | Six blocks, a Query Loop variation and seven shortcodes | Block themes and classic themes |
| Adapter | One small file per theme family: selectors, menu locations, dark mode and colours | Aeon News, block themes, classic themes, tagDiv Newspaper |
| Templates and hooks | Template overrides, theme functions, filters | Theme developers |
On this page
The Compatibility tab
Settings › Aeon News Subscription › Compatibility (Kompatibilitet) shows what the plugin has found on the site.
- Theme (Tema): Active theme, Adapter (marked Tested / Testad or Not tested / Ej testad), Kind of theme (Block theme / Blocktema or Classic theme / Klassiskt tema), Article text, Headlines in lists, Menus with the account link and Dark mode.
- Page caches (Sidcache): the caches the plugin empties when the policy or an article changes.
- Search engines (Sökmotorer): the SEO plugin that receives the paywall fields.
- Cache test (Cacheprov): Run test (Kör test) sends the same private request twice and reports whether a cache in front of the site stored the answer. A local site often cannot call itself; run it on the live site.
- Search crawlers and locked articles: see Paywall › Google.
Adapters
The adapter is chosen from the theme (a child theme reports its parent).
| Adapter | Tested |
|---|---|
| Aeon News | Yes |
| Block themes (tested with Twenty Twenty-Five and Twenty Twenty-Two) | Yes |
| Classic themes | Yes |
| tagDiv Newspaper | No. Written from tagDiv’s public documentation; the theme is not in our test rig. |
An adapter holds the title selectors for the automatic badge, the article body selector, the classic menu locations that get the account link, the theme’s dark-mode selector and four design values (accent, text, heading font and body font). A developer can replace or extend it with the filter aeon_news_subscription_adapter; values are validated before they are printed.
On block themes the account link goes into the first Navigation block on the page. On classic themes it goes into the adapter’s menu locations.
Blocks and shortcodes
All blocks are rendered on the server and look the same for every reader; the signed-in state is filled in by the browser.
| Block (EN / SV) | Shortcode | Shows |
|---|---|---|
| Account link | [aeon_account_link label=""] | ”Sign in” for everyone; the account menu for a signed-in reader |
| Access badge / Åtkomstmärke | [aeon_access_badge id=""] | The badge of an article (the current one when id is empty). Use it in a Query Loop. |
| Paywall break / Betalväggsbrytning | – | Saves <!--aeon-paywall-->. Readers without access stop reading here. |
| Subscribe call to action / Uppmaning att prenumerera | [aeon_subscribe title="" text="" button=""] | A heading, a short text and a subscribe button |
| Bookmark button / Bokmärkesknapp | [aeon_bookmark id=""] | A save button for one article |
| Saved articles | [aeon_bookmarks count="10"] | The signed-in reader’s saved articles |
| – | [aeon_premium_articles count="5"] | The newest locked articles |
The Query Loop variation Premium articles lists only locked articles. In the editor its preview shows recent posts, because the editor cannot pass the access filter; on the page it lists locked articles only.
In lists (front page, archives, search, Query Loop) the article text is replaced by the teaser without a wall; the wall belongs to the article’s own page. The archive /plus/ lists locked articles, and search never matches text behind the wall.
Template overrides
Copy a template to aeon-subscription/<name>.php in your theme or child theme to change its markup: account-link, subscribe-cta, bookmark-button, bookmarks, premium-list, badge and wall. The CSS classes stay the same (for example .aeon-wall, .aeon-account-link, .aeon-bookmark-button), so the plugin’s script keeps working.
Theme functions return values and never print, so a theme can call them behind function_exists(): aeon_news_subscription_render_account_link(), _render_access_badge(), _render_article_tools(), _safe_excerpt(), _account_state(), _content_is_denied() and _is_protected().
Page caches
Pages are the same for every reader, so they may be cached; the plugin needs no exception in the host’s cache. Everything that depends on the reader is a POST request or lives under wp-admin/, which caches leave alone by default.
When the policy changes, the plugin empties the whole page cache (at most once a minute). When one article changes mode at a set time, only that article and the front page are emptied. Adapters: Aeon News theme, Kinsta, WP Rocket, LiteSpeed Cache, W3 Total Cache, WP Super Cache, SiteGround Optimizer, WP Engine and the Cloudflare plugin.
For another cache, hook into the actions aeon_news_subscription_purge_post (one article) and aeon_news_subscription_purge (everything). Without any of them, a page still lapses on time: its shared cache lifetime ends at its next access change.
SEO plugins
The paywall fields go into the article node of Rank Math, Yoast SEO, SEOPress, All in One SEO or The SEO Framework. Rank Math is tested against the real plugin; the others through their documented filters. See Paywall › Google.
Known limits
- A theme that reads
post_contentdirectly instead of usingthe_contentcannot be protected there. Useaeon_news_subscription_safe_excerpt()in that code. - Protected media files and third-party output endpoints need their own protection.
- The automatic badge and the account link need the adapter’s selectors and menu locations; check the Compatibility tab after a theme change.